We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i have a checkbox is_new that when checked will enable a dropdown #Dealership_make_code
is_new
#Dealership_make_code
basically i'm trying to get my error checking to validate and make sure a dropdown option has been selected if the checkbox is checked.
If checkbox is NOT checked, dropdown can be empty. Here is my code
array( 'make_code', 'site.common.components.validate.EConditionalValidator', 'conditionalRules' => array('is_new', 'compare', 'compareValue' => 1), 'rule' => array('required'), 'clientValidationJS' => "if ($('#Dealership_is_new :checkbox:checked').length > 0) { if ($('#Dealership_make_code').val().length === 0) { alert($('#Dealership_make_code').val().length); messages.push('cannot be empty'); } } " ),
i cant seem to get this to work, nor can i get the client side to work either. Any idea what i'm missing? Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i have a checkbox
is_new
that when checked will enable a dropdown#Dealership_make_code
basically i'm trying to get my error checking to validate and make sure a dropdown option has been selected if the checkbox is checked.
If checkbox is NOT checked, dropdown can be empty. Here is my code
i cant seem to get this to work, nor can i get the client side to work either. Any idea what i'm missing? Thanks
The text was updated successfully, but these errors were encountered: