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

hi, is there any way to use tab indexes with Form Helper in version 1.6.1?

Yes. All form helper functions accepts an "extra" parameter so you can pass all HTML attributes
For example
echo form_input('username', 'johndoe', 'tabindex="1"');

i tried:

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

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

cool, that worked

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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