I can't get my buttons to index properly
I'm having some issues with form tabindexing. I have two submit buttons in my form, and the one I want to be indexed first isn't. This is currently what I have on my buttons:
$form['prev']['#attributes']['tabindex'] = '0'
$form['next']['#attributes']['tabindex'] = '1'
On this liv开发者_如何学Ce version it shows up in the attributes they show up on both buttons.
I'm using Drupal 7 and creating my own custom form module.
$form['company'] = array(
'#title' => t('Company'),
'#type' => 'textfield',
'#required' => TRUE,
'#attributes' => array('tabindex' => '6'),
);
this is how you set your tab index programatically.
精彩评论