# Make Button perform an html, not a link

**URL:** <https://forums.realmacsoftware.com/t/make-button-perform-an-html-not-a-link/53344>\
**Category:** Elements\
**Created:** [December 22, 2025, 11:36pm UTC](https://forums.realmacsoftware.com/t/make-button-perform-an-html-not-a-link/53344 "2025-12-22T23:36:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liquidoranges](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@liquidoranges](https://forums.realmacsoftware.com/u/liquidoranges)\
**Post date:** [December 22, 2025, 11:36pm UTC](https://forums.realmacsoftware.com/t/make-button-perform-an-html-not-a-link/53344/1 "2025-12-22T23:36:13Z")

</div>

I want to make certain buttons run an html code which generates an email in their email program with the subject matter already inserted, ready to send to me. I have this HTML code. How do I make a button run this code? TIA

---

<div class="post-metadata">

**Author:** ![Doobox](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/doobox/32/32373_2.png) [@Doobox](https://forums.realmacsoftware.com/u/Doobox)\
**Post date:** [December 23, 2025, 12:17am UTC](https://forums.realmacsoftware.com/t/make-button-perform-an-html-not-a-link/53344/2 "2025-12-23T00:17:10Z")

</div>

Do you mean a mailto link?

```javascript
<a href="mailto:me@example.com?subject=My%20Subject">Email me</a>

```

if so, then you can set the button link simply like this, replacing any spaces with %20

 ![CleanShot 2025-12-23 at 12 .14.46@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/2/7/27f55e6bc0eb8d5dcec8f72d634826839f794d38.png)

Word of warning though. Trawling robots will be able to see that raw email address and collect it. That data will very likely be sold and spammed.

---

<div class="post-metadata">

**Author:** ![liquidoranges](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@liquidoranges](https://forums.realmacsoftware.com/u/liquidoranges)\
**Post date:** [December 23, 2025, 2:06am UTC](https://forums.realmacsoftware.com/t/make-button-perform-an-html-not-a-link/53344/3 "2025-12-23T02:06:26Z")

</div>

Appreciate the warning. I won’t do it. I need a safe way for someone to click on an artwork and have it generate an email to me with that specific artwork in the email header…. I’m not a coder (which is why I used RapidWeaver Classic since 2008)

Reese Schroeder  
Artist

Rancho Mirage, CA

liquidoranges STUDIO

Visual Metaphors

> **[Visual Metaphors](http://liquidoranges.com)**
>
> Digital paintings by Reese Schroeder that explore visual impressions of moments, as visual metaphors.

Instagram: @reese\_schroeder\_artist

All information contained within this electronic email correspondence, including data, attachments, images, ideas are protected by national and international intellectual property right and copyright laws © Reese Schroeder and liquidoranges STUDIO, ALL RIGHTS RESERVED.

---

<div class="post-metadata">

**Author:** ![Doobox](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/doobox/32/32373_2.png) [@Doobox](https://forums.realmacsoftware.com/u/Doobox)\
**Post date:** [December 23, 2025, 3:01am UTC](https://forums.realmacsoftware.com/t/make-button-perform-an-html-not-a-link/53344/4 "2025-12-23T03:01:47Z")

</div>

This would require a custom component with server-side PHP to handle the emailing, so your email address is never exposed in the page source.

The component would take the artwork URL (and optionally artwork name, subject, or other details) in hidden form fields, and display a button like “Email me details of this artwork” positioned below the artwork.

When the button is clicked, the visitor enters their email address and submits the form. The data is sent to a server-side PHP script where your email address lives securely, and an email is sent to you containing the artwork details and the visitor’s contact info.

I could provide a quote for creating such a component if you’d like to contact me via my website. (click my avatar for the url).
