简体   繁体   中英

validation of hidden elements zend form

In my view, I am setting the visibility of few of my form elements to none using jquery (practically by calling the fadeIn and fadeOut methods). The problem is that because of hiding these elements, the validation is not performed on the hidden elements anymore. Any idea how can I persist the validation checking while the element is hidden (or folded)?

you can't perform validation on non visible elements because they're not even submitted with the form.

Maybe you use hidden inputs instead and perform some filling when the form submit event occurs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM