Hi All
As per form quickstart guide, forms can have #type as 'values'.
Example:
<?php
$form['foo'] = array('#type' => 'value', '#value' => 'bar')
?>
Later point of time, we can retreive the value as $form_state['values']['foo'], and value retreived should be 'bar'.
In my module hook_form api, I have added
$form['companies'] = array(
'#type' => 'value',
'#value' => '1',
);
In hook_form_alter, I want to get the value of $form_state['values']['companies'] and increment $form_state['values']['companies'] by 1.
Is this allowed or Drupal has any restriction.
When I access the value of $form_state['values']['companies'], it just gives me empty value ('').
What could be problem here?
Regards
Austin