I've a form...
function modulename_myform($form, &$form_state)
{
$form['my_ta'] = array(
'#type' => 'textarea',
'#resizable' => FALSE,
);
$form['my_submit'] = array(
'#type' => 'submit',
'#input' => TRUE,
'#value' => 'Submit',
'#name' => 'sub_1',
'#button_type' => 'submit',
);
return $form;
}
My form couldn't submit any data... So I tried doing two variants...
/* Form Submit */
function modulename_myform_submit($form, &$form_state)
{
drupal_set_message('Submitted Value @name',array('@name'=>$form_state['values']['my_ta']));
}
Output : Doesn't print anything and says value is null at that location...
/* Form Submit */
function modulename_myform_submit($form, &$form_state)
{
drupal_set_message(t('Submitting values: @values', array('@values' => var_export($form_state['values']['my_ta'], TRUE))));
}
Output : Prints the Dump with proper values...
Why is that? It should be giving me the text entered in my_ta right? Please help me...