I try to change in D7 a form value after submit with form_set_value in a custom validation function. This works ok with a text field, but with a radio field I get:

Recoverable fatal error: Argument 2 passed to drupal_array_set_nested_value() must be an array, null given

The code: form_set_value($element['und'][0]['value'], 'my_new_value', $form_state);

Am I doing something wrong or is this a bug in D7?

Comments

dtksmsl’s picture

I wonder if you were able to fix this problem. I am trying to use drupal_set_value from inside an ajax callback function but it doesn't seem to seem to be working.