We help IT Professionals succeed at work.

formvalidation.io validate form on class click

petewinter asked
Last Modified: 2017-03-23
I am using this form validation script: http://formvalidation.io/settings/

Can you please help me find how I change my code to submit the form on click of element with the class name of "csaf-stage1".

$(document).ready(function() {
		// live: 'enabled', // Default value
		trigger: 'input change keyup',
		fields: {
			default_deposit_amount: {
                validators: {
                    greaterThan: {
                        value: getDepositAmount,
                        message: 'The higher deposit must be 5% or greater'
	}).on('success.form.fv', function(e) {
	// success code here

Open in new window

Watch Question

Distinguished Expert 2017
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)


Thanks, but my form is not validating so I must have done something wrong if you can please check:


JQuery: http://dev.cmyuk.com/csaf/js/csaf.js

I basically want the form to submit when the "Next Step" text or if the "PURCHASE WITH FINANCE - CSAF" bar is clicked. So multiple trigger. Also you will notice the fields have live validation if you type in the loan value field.

Any idea what I am doing wrong?


Thanks, but all I need to do was to add the below to my original code.

$( ".csaf-stage1" ).click(function() {
Distinguished Expert 2017

I hope that someway I find a solution to your problem. I search a lot your code but my code based at this link.
Thanks a lot.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions