Dan G. Switzer, II schrieb:
>> I'd have to take a look at your demo page, but it sounds like what you
>> need to use is the errorPlacement option. That allows you to customize
>> the placement of generated labels (instead of the default, insert after
>> invalid element). Let me know if that doesn't work in your scenario.
>>     
>
> I guess I could use the errorPlacement, but that can get ugly when it's
> really only one error message you want to move.
>
> Take a look at your example page:
> http://jquery.bassistance.de/validate/demo-test/
>
> My code is almost identical (because it's seeded from your example.)
> However, on the "Please agree to our policy" line, I've moved the checkbox
> *before* the phrase--which is generally where people put it.
>
> When you do this, the default placement for this one label isn't in a good
> spot--it gets placed between the checkbox and the text. My work around was
> to put this line after the "please agree" text:
>
> <label for="agree" class="error" generated="true"></label>
>
> Having to add the "generated" attribute makes the markup fail validation.
>   
Thanks for detailing this example. If have placement of generated labels 
at radio buttons and checkboxes still on my know issues list, this 
should help solving that.

I'm not 100% sure how you would like to have the error message 
displayed, you could paste a more complete example? Or page? Whatever 
shows where the error should be in relation to the checkbox.

-- 
Jörn Zaefferer

http://bassistance.de


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to