[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-13 Thread Sam
>>How to change the default position of an error message in Jquey form >>validation plugin? This is easy to do. Just create a label element where you want the error message to appear. If the field you are validating is called "foo" your label would look like: This field is required You must pu

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Don Dunbar
Hi, glad you found a solution:to prevent the user from filling out both inputs in the first place. [code]$("#days").change(function(){ $("#participations").attr("disabled","disabled"); }); $("#participations").change(function(){ $("#days").attr("disabled","disabled");

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread d...@amystdesign.com
It will be confusing for someone filling out your form if you leave both fields available at the same time, instead... when the user enters text into one of the fields why don't you run an onChange or onKeyPress check to see if they've entered something and if so, disable/hide the other field .att

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Phper
Also, how to prevent a user filling out both fields? On Oct 12, 4:48 pm, Phper wrote: > How to change the default position of an error message in Jquey form > validation plugin? > > On Oct 12, 4:33 pm, Gordon wrote: > > > If you're using the Metadata plugin and inline rules: > > > > > > > > I

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Phper
Also, how to prevent a user filling out both fields? On Oct 12, 4:48 pm, Phper wrote: > How to change the default position of an error message in Jquey form > validation plugin? > > On Oct 12, 4:33 pm, Gordon wrote: > > > If you're using the Metadata plugin and inline rules: > > > > > > > > I

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Phper
How to change the default position of an error message in Jquey form validation plugin? On Oct 12, 4:33 pm, Gordon wrote: > If you're using the Metadata plugin and inline rules: > > > > > I've not actually tested it but it should work. > > On Oct 11, 4:37 am, Phper wrote: > > > There are two

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Gordon
If you're using the Metadata plugin and inline rules: I've not actually tested it but it should work. On Oct 11, 4:37 am, Phper wrote: > There are two input fields in a form, but only one of them is > required, they are not required at the same time. Either A or B is > required. ( A is requi

[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread Phper
No, I can not use radio. At the help of a veteran programmer, I was able to write the following code and it works. http://code.jquery.com/jquery- latest.js"> http://dev.jquery.com/view/trunk/ plugins/validate/jquery.validate.js">