Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

if checkbox is checked open forms

      <div class="form-group" id="checkbox">
        <%= f.check_box :paydeliver %>
        <%= f.label :paydeliver, "Pay $25" %>
      </div>

      <div id="delivery" style="display:none;">
        <div class="form-group">
          <%= f.label :addysdeliver, "Delivery address"%>
          <%= f.text_field :addysdeliver, class: "form-control"%>
        </div>
      </div>

      <%= f.submit "Go!", class: "btn btn-primary btn-large btn-block" %>

      <% end %> #end of form
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #checkbox #checked #open #forms
ADD COMMENT
Topic
Name
3+2 =