I'm using the validator plugin found here to validate a form.
Problem I'm having is if I put the following around a form input element the validation fails:
<div style="display:none;"><input type="text" name="test" /></div>
I need this because I'm using other UI control layers for the input elements and don't want them visible.
It works on inline and block elements, but I need it to be hidden. Is there anyway to get around this?
Thanks for any feedback
Update:
I'm mostly validating select option fields, with django (ie: {{form.select_option_element}} )
So effectively:
<div style="display:none;">
{{form.select_option_element}}
</div>
...doesn't work
Right after posting I seem to solve it with:
<div style="visibility: hidden; height: 0;">
{{form.select_option_element}}
</div>
It then allows me to validate the field.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…