Question

I've tried tabindex => '1' and tabindex = '1', but I cannot get tab index/tab order to work. I want to go from :full_name to :telephone to :address (it's the columns messing the ordering up). Any ideas? Thanks in advance. Here's my code.

=simple_form_for( :application, :url => users_path( application ), :method => :put ) do | f |
  .clearfix
    .column
      =f.input :full_name, label: 'Full Name', placeholder: 'Full Name'
      .help-block * please enter your legal name
      =f.input :address_1, label: 'Address', placeholder: 'Apartment, Street'
      .guardian
        =f.input :guardian_full_name, label: 'Guardian Full Name', placeholder: 'Full Name'
    .column
      =f.input :telephone, label: 'Telephone Number', as: :string
      .help-block  
      =f.input :address_2, label: ' ', placeholder: 'City, Country, Zip/Postcode'
      .control-group.boolean  
      .guardian
        =f.input :guardian_email, label: 'Guardian Email Address', placeholder: 'Email Address', as: :string
    .column#partner-details-errors
      =render 'partner_details_errors', application: application
  =f.submit 'Show Contract', class: 'btn btn-primary', data: { 'text' => 'Create Contract', 'disabled-text' => 'Creating ...' } 
Was it helpful?

Solution

Use input_html option:

=f.input :full_name, label: 'Full Name', placeholder: 'Full Name', input_html: { tabindex: 1 }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top