FAPI/CCK Confusion: 'value' vs '#value'
Angie Byron wrote a nice article on Drupal.org that explains something about how to form_alter CCK fields. At the very end it says:
No, you didn't read that wrong. Sometimes you need to set both ['value']['#value'] and ['#value']['value']. And other times you need to change the field value in $form_state['values']. It seems to be that one controls the value displayed on the form, and the other affects the value sent to the database. You need both to avoid NULL values and "Value is required for field blah blah blah" errors.
If anyone can shed some light on what the heck is going on here, that would be awesome. ;P
- Login or register to post comments
- Feed: Lullabot Writings
- Original article