Skip Navigation

[Resolved] How to add onclick javascript event to Toolset Form submit button

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by kirillS-3 6 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#916985

I want to track form submit event for toolset form

#917160

You can use jQuery's submit event handler to trigger any custom code, but there is no additional JavaScript API for Forms events.

jQuery(document).ready(function(){
  jQuery('.cred-form').submit(function(e){
    // add your tracking code here 
    // use the namespace jQuery instead of $
  });
});
#919570

Thanks Christian, it works.