[support] multiple buttons with same #value D5
Jamie Holly
hovercrafter at earthlink.net
Wed Mar 25 16:08:52 UTC 2009
D6 has the clicked_button value set:
http://drupal.org/node/144132
Instead of just returning the value of the clicked button in
$form_state['op'], you get the entire form element returned.
Jamie Holly
http://www.intoxination.net
http://www.hollyit.net
Ivan Sergio Borgonovo wrote:
> On Wed, 25 Mar 2009 16:32:10 +0100
> Ivan Sergio Borgonovo <mail at webthatworks.it> wrote:
>
> I had to resort to some Web 1.5 techniques
>
> $form['add'][$id]=array(
> // '#type'=>'button',
> '#type'=>'submit',
> '#name'=>$id.'-add',
> '#value'=>t('Add'),
> );
> }
>
> roll over qty
>
> foreach($form_values['qty']...
> if($form_values[$key.'-add']==t('Add');
>
> Did things get better in D5+?
>
>
More information about the support
mailing list