Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Listbox and validation when there is other field



1:31 pm on Mar 8, 2013 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

I have set JQuery validation and other field. This field (call it field1) can be in the case of Listbox or Text box when users choose option 'Other'.
Source: [bassistance.de...]

How to set additional
1. toogle option to show this field with the AJAX based code like:
myfield2: {
required: function(element) {
return jQuery("#myfield1").val() == 'otherfield1'
but field2 depends on field1 and its value (otherfield1)and not other selected options.

2. when there is value inside field2 it should show an error as field1 is already with value.

Is this possible to be achieved?

Featured Threads

Hot Threads This Week

Hot Threads This Month