开发者

I can't get my buttons to index properly

开发者 https://www.devze.com 2023-03-21 04:52 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消