Skip to content
New issue

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

Is there a way to check if the field is already hidden?? #154

Open
sumeetwork opened this issue Jun 28, 2013 · 0 comments
Open

Is there a way to check if the field is already hidden?? #154

sumeetwork opened this issue Jun 28, 2013 · 0 comments

Comments

@sumeetwork
Copy link

Hi,
I am working on a form obviously :), I am working on a function that if a option from a dropdown list is selected some of the fields get hidden and if the other option are selected the fields come back again... for obvious reasons toggle and remove is not working, is there a way to show the hidden fields with validations??

please help :)

Code:

$('#emp-status').change(function(){
if($('#emp-status').val() == 'not-employed'){
$myform.toggleFields([ 'emp-bussiness-name', 'emp-bussiness-phone', 'emp-address1', 'emp-city', 'emp-province', 'emp-country', 'emp-postal-code' ])
}
else{
$myform.toggleFields([ 'emp-bussiness-name', 'emp-bussiness-phone', 'emp-address1', 'emp-city', 'emp-province', 'emp-country', 'emp-postal-code' ])
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant