I'm modifying in a form in my custom module. Code looks like:
function my_module_form_alter(&$form, &$form_state, $form_id) { if ($form_id == "someID") { $form['field_charity_author']['und'][0]['value']['#value'] = arg(3); //$form['field_charity_author']['#type'] = 'hidden'; } } However, I think hard-coding und is bad. What should be the proper way to modify form fields properly in this case?
Thanks.