-
AuthorPosts
-
August 25, 2017 at 6:46 pm #844114
Hello,
How can I add onclick event for a contact form button? Need to add something similar to this onclick=”do_this()” to certain forms.
Also adding the above applies to all forms or can I apply it to certain contact forms only?Thanks for your time!
August 25, 2017 at 10:36 pm #844215I’m trying to achieve the following:
After user fills in name and email, clicks Download button
<input type=”submit” id=”#” value=”Download” onclick=”get_trial()”/>
need to trigger this function:
<script language=”javascript”>
function get_trial(){
document.the_form_name.action=”http://www.site.com:/trial”;
}
</script>Also I need the form name and set the form action to action=””
August 25, 2017 at 10:47 pm #844227Hi,
Try the solution posted in this thread: https://kriesi.at/support/topic/please-clear-this-up-for-em-ga-tracking-2/#post-349057
Best regards,
NikkoAugust 25, 2017 at 11:11 pm #844236Thanks for pointing me in the right direction, this might actually work.
Can you please let me know how I get the name of the form or assign a custom name to the form?
-
This reply was modified 8 years, 2 months ago by
wmaker.
August 26, 2017 at 10:22 pm #844450August 28, 2017 at 4:52 pm #844883Is there any option to set the form action to action=”” ? I need to send the form data to a different URL and so far anything I’ve tried won’t work…
August 28, 2017 at 6:35 pm #844956Hi,
I don’t think there’s an option for that since it will affect all other contact form. I would suggest using contact form plugins or adding the html form manually.
Best regards,
Nikko -
This reply was modified 8 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.

