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

toggleFields only works on 1st Step #58

Open
spacemoc opened this issue Jun 7, 2015 · 2 comments
Open

toggleFields only works on 1st Step #58

spacemoc opened this issue Jun 7, 2015 · 2 comments

Comments

@spacemoc
Copy link

spacemoc commented Jun 7, 2015

toggleFields only works on 1st Step, also there is no way of removingRules, you can addRules but not remove, also it doesn't work with hide, show div element. Once you hide div element validation is still asking for fields to be filled in but you don't see them, also when you have multiple hidden divs and you open them one after the other all the validation adds up.

$('form').idealforms('toggleFields', 'emaple_field');

@spacemoc
Copy link
Author

spacemoc commented Jun 8, 2015

Following construction doesn't work with VALIDATION

HIDE fields but those fields still being validated

$('form.idealforms').idealforms('toggleFields', 'monthly_pension_amount pension_type getretired company_name getemployed');

When above line commented below works okay with validation, therefor I am not getting this !! -->

    $('#employment_details').change(function() {
        if (this.value == 'Retired') {  
            $('form.idealforms').idealforms('toggleFields', 'company_name getemployed');

            $('form.idealforms').idealforms('goToStep', 5);
        }

        if (this.value == 'Employed') { 
            $('form.idealforms').idealforms('toggleFields', 'monthly_pension_amount pension_type getretired');
            $('form.idealforms').idealforms('goToStep', 5);
        }

        $('#employment_details').attr('disabled', 'disabled');
    });

@spacemoc
Copy link
Author

spacemoc commented Jun 8, 2015

Basically when you trying to toggle fields first, fields are not displayed but validation is still displayed, then upon drop down selection I am using toggle again and then showing required fields but validation still there for all the hidden fields. When I remove 1st toggleFields and all the fields are displayed validation showing all to be validated then when I use select drop down and select value only required fields and validation appearing which is perfect. but why do i have to show allt eh fields first and then eliminate???

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