Jump to content

2 button in 1 form


robert_gsfame

Recommended Posts

I am really confused with this, hope someone could help..

 

let say i have 2 button in one form, first button i will use to do the submission while the other one will be used to send an email to user's email typed in the textbox..how to do it using javascript??

 

<form name = " form1" action="POST">

<input type = "submit">

<input type="text" name="user_email">

<input type="button">

</form>

 

What should i do with the button??

 

Link to comment
Share on other sites

Hi robert_gsfame,

 

What you are proposing is not possible, there is no way to email form data using Javascript.

 

You would be better off having a checkbox on your form, something like "Email me a copy", then in your PHP code have an if statement which essentially says if checkbox is checked, send email to email address.

 

Hope this helps.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.