By czollli on
Hello,
I have the following code:
function autofill_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'webform_client_form_2') {
$form['submitted']['acc_id'][1]['#value'] = arg(2);
}
}
and it does what I expect (fills a webform field with the url argument).
But it didn't save the field value in the webform :(
Can anybody help me, what I did wrong?
Thanks!
Czollli
Comments
Hi, Can you try this:
Hi,
Can you try this: $form['submitted']['acc_id'][1]['#default_value'] = arg(2);
Vasi.
That's it. Thanks a lot!
That's it. Thanks a lot!