Hmm, I will give it a try. I am currently hiding the container element
of the form fields.  I suppose this means I would need to write a
custom method for hiding/showing which adds this class name and add it
to the actual form field element too.

On Fri, Oct 10, 2008 at 1:42 PM, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
> You use the ignore-option (a selector) to set additional elements to
> ignore when validating. One approach would be to define a class in
> your stylesheet with display:none, then adding and removing that class
> to hide an element, and set the option ignore:
> ".customClassHidingElements".
>
> Jörn
>
> On Fri, Oct 10, 2008 at 12:23 PM, Weyert de Boer <[EMAIL PROTECTED]> wrote:
>>
>> Hello!
>>
>> I am currently hiding or showing specific form fields depending on
>> specific conditions. Only if the field is hidden they are still used
>> to validate against when submitting the form. Are there any ways to
>> ignore any field validations when the element is hidden? Because when
>> the field is hidden it doesn't have to be filled in.
>>
>> Any way to solve this? I am currently using code like this:
>>
>> $("#question_2").click(function() {
>>   var itemValue = $("#question_2").val();
>>   var toggleItems =
>> $("#field-question_11,#field-question_12,#field-question_13");
>>   var condition = eval("itemValue == 'd'");
>>   if ( condition ) { toggleItems.show() } else { toggleItems.hide() };
>> });
>>
>> Yours,
>> Weyert de Boer
>>
>

Reply via email to