1

I am building a multistep form in rails. I have opted to go the jquery route and use the jquery-steps plugin. The form isn't being split up into two different forms- the form is simply just staying together on one page. The jquery-steps plugin is generating a previous and next button on the page. I am using fieldset as the bodyTag and h2 as the headerTag. The wizard plugin seems to be loading when I use chrome developer tools to call steps() on the div. Although the code below shows a lot of divs in the wizard div, even when I remove them, I still end up with the same issue.

<!--=== Content Part ===-->
  <div class="container content">
    <div class="row">
      <script>
                $(function ()
                {
                    $("#wizard").steps({
                        headerTag: "h2",
                        bodyTag: "fieldset",
                    });
                });
      </script>
      <div id="wizard">
        <%= form_for @suppform, url: new_business_supp_form_path do |f| %>
          <div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
            <div class="reg-header">
              <h2>Business Contact</h2>
              <p>Enter the business's primary contact information</p>                    
            </div>
            <fieldset>
              <div class="row">
                <div class="col-sm-6">
                  <%= f.label :first_name %>
                  <%= f.text_field :first_name, :class => "form-control margin-bottom-20" %>
                </div>
                <div class="col-sm-6">
                  <%= f.label :last_name %>
                  <%= f.text_field :last_name, :class => "form-control margin-bottom-20" %>
                </div>
                    </div>
              <div class="row">
                <div class="col-sm-6">
                  <%= f.label :work_phone_number %>
                  <%= f.text_field :work_phone_number, :class => "form-control margin-bottom-20" %>
                </div>
              </div>
            </fieldset>
            <div class="reg-header">
              <h2>Business Information</h2>
              <p>Enter your business's information</p>                    
            </div>
            <fieldset>
                <%= f.label :business_address %>
                <%= f.text_field :business_address, :class => "form-control margin-bottom-20" %>
              <div class="row">
                <div class="col-sm-6">
                  <%= f.label :business_postal_code %>
                  <%= f.text_field :business_postal_code, :class => "form-control margin-bottom-20" %>
                </div>
                <div class="col-sm-6">
                  <%= f.label :business_city %>
                  <%= f.text_field :business_city, :class => "form-control margin-bottom-20" %>
                </div>
              </div>
             <hr>
            </fieldset>
          </div>
        <% end %>
      </div>
    </div>
  </div><!--/container-->       
<!--=== End Content Part ===-->
Questifer
  • 1,113
  • 3
  • 18
  • 48
  • Can you expand on "shows a lot of divs in the wizard div"? what does it actually look like? What do you expect it to look like? – Taryn East Aug 21 '14 at 02:06

0 Answers0