I think you have to make your own validation function instead of using the one that comes by default and supports #required.<br><br>Use #access (not #hidden) to hide the field.<br><br>Then in your validator, check to see whether it's OK that the field is not filled in, and notify as needed.<br>
<br>-Randy<br><br><div class="gmail_quote">On Fri, Nov 11, 2011 at 8:50 AM, Idan Arbel <span dir="ltr"><<a href="mailto:idan@arbel-designs.com">idan@arbel-designs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<p class="MsoNormal">When setting the #type = hidden<u></u><u></u></p><p class="MsoNormal">The field is hidden, but when trying to submit the form I get an error about the fields being required.<u></u><u></u></p><p class="MsoNormal">
Looking at the $form dump, I see that the select field has a default value. (a term id). <u></u><u></u></p><p class="MsoNormal">I tried changing the Required to false when hiding but then the field looses its value.<u></u><u></u></p>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1 970.462.7450<br><br>