[support] Changing checkboxes options during hook_node_validate

Jeff Greenberg listmail.ayendesigns at gmail.com
Wed Feb 11 14:31:37 UTC 2015


I have a node form that contains a checkboxes field with options NULL at
the time the form is displayed.

During node_validate, if certain criteria is met, an array of options
(checkboxes) is created, and the form needs to be redisplayed with the
checkboxes as part of it.

I've tried setting #options = the new array in the $form, in
$form_state[original_form], etc all to no avail. The field doesn't change.

I also set one checkbox in the field at the start, so that I could find it
in the $form and $form_state structures, changed where I found it to the
new options array, and again, no change. I am setting $form_state[rebuild]
to true, and even tried explicitly calling for the form to be rebuilt.


-- 
---
drupal.org/user/367108
linkedin.com/in/jeffrgreenberg
accidentalcoder.com / ayendesigns.com
@accidentalcoder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20150211/936ca692/attachment.html 


More information about the support mailing list