JavaScript and AJAX Forum

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.