Skip Navigation

[Resolved] “Submit is not a function”

This thread is resolved. Here is a description of the problem and solution.

Problem:
Javascript error "Submit is not a function" on console

Solution:
User did not added the custom Javascript code correctly.

You can find proposed solution, in this case with the following reply:
https://toolset.com/forums/topic/submit-is-not-a-function/#post-2239093

Relevant Documentation:

This support ticket is created 2 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by jamesR-13 2 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#2234539

Previously working jQuery validation script now giving error:

(index):379 Uncaught TypeError: jQuery(...).submit is not a function

Please enable private reply so I can give you access.

#2234827

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes, please can you share problem URL where I can see the issue as well as admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2236011

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Unfortunately the admin access details you shared is not working at this end. Can you please send me working admin access details.

I have set the next reply to private which means only you and I have access to it.

#2239093

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The JS code you added to your form's JS editor was not added correctly.

I've adjusted it as given under and I can see that the JS error is gone:

jQuery(document).ready(function($){

$( '#cred_form_11_1_1' ).submit( function($) {
  if ( jQuery( "input[name='wpcf-has-uniform-items']" ).val() == 'Yes') {
      if ( jQuery( "input[name='wpcf-neck']" ).val() == ''){
      jQuery( "input[name='wpcf-neck']" ).focus();
      alert( "Please complete the measurements" );
      return false;
        }
  };
});
  
});
#2239287

While the code no longer throws an error, it still doesn't

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.