- A user ist loading a Node-Edit-Form and field_example has value "foo" at this moment.
- While editing other fields of the node the field_exapmle is changed via field_attach_update() to "bar".
- When submitting the form, field_example is reset to "foo".
How can I bypass that reset?
(field_example can be hidden at the form.)
I tried:
function module_name_form_alter(&$form, &$form_state, $form_id) { //variant 1 $form['field_example']['#access'] = FALSE; //variant 2 unset($form['field_example']); }
No success.
(When I change field_attach_update() to node_save() submit is prevented by form_set_error()).
Is there a way to ignore that field on saving?
(Next time I better use a reference-field, right?)