[support] multiple buttons with same #value D5
Ivan Sergio Borgonovo
mail at webthatworks.it
Wed Mar 25 15:32:10 UTC 2009
I've something like:
$form['add']=array(
'#tree' => TRUE,
);
$form['qty']=array(
'#tree' => TRUE,
);
// ...
while(...) {
$form['qty'][$id]]=array(
'#type'=>'textfield',
'#default_value'=> 0,
'#size'=>3,
'#maxlength'=>3,
);
$form['add'][$id]=array(
'#type'=>'button',
// '#type'=>'submit',
// '#name'=>$id,
'#value'=>t('Add'),
);
}
In a table
+ a general submit button
If the general submit button is pressed all the qty have to be
collected... and saved in the DB.
If one of the add button is pressed I should record just the qty of
the corresponding button.
But since all buttons should have the same #value, I can't see how I
could understand which one was pressed in the _submit function.
I can't use JavaScript.
thanks
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
More information about the support
mailing list