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
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

mfb - February 4, 2008 - 21:36

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

mfb - July 2, 2008 - 23:30
Status:active» fixed

Please re-open if you have more questions.

#3

Anonymous (not verified) - July 23, 2008 - 10:56
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.