<%
  row = cell(:elements, :row).new
  block = cell(:elements, :block).new(class: 'xs-12 sm-12 md-12')
  code = cell(:elements, :code).new
%>

<!-- PRESENTATION -->
<%=raw row.open %>

  <%=raw block.open %>

    <%=raw cell(:elements, :title).new(label: 'Cells Inputs: Form') %>

    <p>A Form is a container for inputs.</p>

  <%=raw block.close %>

<%=raw row.close %>
<!-- / PRESENTATION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Normal Form', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <% example_form = cell(:inputs, :form).new(url: '#') %>

    <%=raw example_form.open %>

      <%=raw cell(:inputs, :text).new(name: 'sample', label: 'Input inside POST form') %>

    <%=raw example_form.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %> example_form = cell(:inputs, :form).new(url: '#') <%= erb_close_tag %>

<%= erb_open_tag %>=raw example_form.open <%= erb_close_tag %>
  ...
<%= erb_open_tag %>=raw example_form.close <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Form with specific method', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <% example_form = cell(:inputs, :form).new(url: '#', method: 'get') %>

    <%=raw example_form.open %>

      <%=raw cell(:inputs, :text).new(name: 'sample', label: 'Input inside GET form') %>

    <%=raw example_form.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %> example_form = cell(:inputs, :form).new(url: '#', method: 'get') <%= erb_close_tag %>

<%= erb_open_tag %>=raw example_form.open <%= erb_close_tag %>
  ...
<%= erb_open_tag %>=raw example_form.close <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Form with remote true', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <% example_form = cell(:inputs, :form).new(url: '#', remote: true) %>

    <%=raw example_form.open %>

      <%=raw cell(:inputs, :text).new(name: 'sample', label: 'Input inside remote form') %>

    <%=raw example_form.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %> example_form = cell(:inputs, :form).new(url: '#', remote: true) <%= erb_close_tag %>

<%= erb_open_tag %>=raw example_form.open <%= erb_close_tag %>
  ...
<%= erb_open_tag %>=raw example_form.close <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Form with responsive inputs', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <% example_form = cell(:inputs, :form).new(url: '#') %>

    <%=raw example_form.open %>

      <% example_row = cell(:elements, :row).new %>

      <%=raw example_row.open %>

        <%=raw cell(:inputs, :text).new(name: 'sample', label: 'Half Input', class: 'md-6') %>

        <%=raw cell(:inputs, :text).new(name: 'sample', label: 'Half Input', class: 'md-6') %>
      
      <%=raw example_row.close %>

    <%=raw example_form.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %> example_form = cell(:inputs, :form).new(url: '#') <%= erb_close_tag %>

<%= erb_open_tag %>=raw example_form.open <%= erb_close_tag %>

  <%= erb_open_tag %> example_row = cell(:elements, :row).new <%= erb_close_tag %>

  <%= erb_open_tag %>=raw example_row.open <%= erb_close_tag %>
    
    <%= erb_open_tag %>=raw cell(:inputs, :text).new(name: 'sample', label: 'Half Input', class: 'md-6') <%= erb_close_tag %>

    <%= erb_open_tag %>=raw cell(:inputs, :text).new(name: 'sample', label: 'Half Input', class: 'md-6') <%= erb_close_tag %>

  <%= erb_open_tag %>=raw example_row.close <%= erb_close_tag %>

<%= erb_open_tag %>=raw example_form.close <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->

<hr>
<%=raw cell(:elements, :title).new(label: 'Form with custom class', size: 3) %>

<%=raw row.open %>

  <%=raw block.open %>

    <% example_form = cell(:inputs, :form).new(url: '#', class: 'my-custom-class') %>

    <%=raw example_form.open %>

      <%=raw cell(:inputs, :text).new(name: 'sample', label: 'Input inside form') %>

    <%=raw example_form.close %>
    
  <%=raw block.close %>

<%=raw row.close %>

<!-- CODE SECTION -->
<%=raw row.open %>

<%=raw block.open %>

<%=raw cell(:elements, :title).new(label: 'Code', size: 6) %>

<%=raw code.open %>

<%= erb_open_tag %> example_form = cell(:inputs, :form).new(url: '#', class: 'my-custom-class') <%= erb_close_tag %>

<%= erb_open_tag %>=raw example_form.open <%= erb_close_tag %>
  ...
<%= erb_open_tag %>=raw example_form.close <%= erb_close_tag %>

<%=raw code.close %>

<%=raw block.close %>

<%=raw row.close %>
<!-- / CODE SECTION -->