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!
I’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=””
Hi,
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,
Nikko
Thanks 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?
Is 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…
Hi,
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