Validation with cck tab forms
NathanRAFT - February 4, 2008 - 04:25
| Project: | jQuery plugins |
| Version: | 5.x-1.2 |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I am looking for a way to use validation with cck forms with tabs. On the next tab click the form would validate keeping the page where it is. Any good ideas for how to begin? Even if the first step is just getting it working with cck...

#1
Here's a code example; clicking on this tab-switch would validate just one element in the form instead of the whole form. element() would return false if the element failed to validate, in which case you could have logic to not switch tabs:
$("#my-tab-switch").click(function() {$("#my-form").validate(my-validate-object).element("#my-element");
} );
By the way, the docs at http://docs.jquery.com/Plugins/Validation are for the latest version of the plugin, which requires jQuery 1.2 and is available only in the Drupal 6 branch of this module.
#2
Please re-open if you have more questions.
#3
Automatically closed -- issue fixed for two weeks with no activity.