25 Apr
2011
25 Apr
'11
1:28 a.m.
On 4/24/11 4:47 PM, jeff@ayendesigns.com wrote:
I have a field myfield that I send to the client as a hidden field with value 0. I change the value, via javascript, on the client.
When I dsm $form in form_submit (I didn't try form_state yet), I see form->myfield->value as 0, but form->myfield->#post->myfield has the correct value.
Are you perhaps setting your value on the hidden field with #value rather than #default_value? There's a note about that here: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html... "Note that if you plan to use JavaScript to change your hidden element's value, you will need to use the #default_value property rather than #value." -- Scott Reynen MakeDataMakeSense.com