• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tabindex for formfields using Form Helper?

#1
[eluser]5indies[/eluser]
hi, is there any way to use tab indexes with Form Helper in version 1.6.1?

#2
[eluser]Seppo[/eluser]
Yes. All form helper functions accepts an "extra" parameter so you can pass all HTML attributes
For example
Code:
echo form_input('username', 'johndoe', 'tabindex="1"');

#3
[eluser]5indies[/eluser]
i tried:
Code:
form_dropdown($fieldid,
                                isset($fieldargs['value'])?$fieldargs['value']:array('N/A'),
                                isset($fieldargs['selected'])?$fieldargs['selected']:'',
                                isset($fieldargs['js'])?$fieldargs['js']:'',"tabindex='10'");

bu it doesn't work.. tabindex parameter isn't included in the html

#4
[eluser]Seppo[/eluser]
Your tabindex is the fifth argument, however it only accept four... I'm not sure what $fieldargs['js'] is, but try using
Code:
(isset($fieldargs['js'])?$fieldargs['js']:'') . "tabindex='10'");

#5
[eluser]5indies[/eluser]
cool, that worked


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.