How to Create a Command Button on a Form That Automatically Attaches It to an Email
- 1). Right-click the HTML page you want to edit, and select "Open With." Click the HTML editor in the list of programs to open your code.
- 2). Locate the form on your page body. If you do not already have a form set up, the following code shows you how to create a simple form that retrieves a reader's first and last name:
<form>
<input type="text">
<input type="text">
</form> - 3). Add the form's "action" property and set the submission to your email address. The following code completes the form setup with your email address:
<form action="mailto:email@domain.com">
<input type="text">
<input type="text">
</form> - 4). Add the command button to submit the form. Place the following code within the "form" tags:
<input type="submit" value="Submit Your Information">
When the user clicks this button, the form's "action" property triggers, and the form submits to your email address.