<%= markdown(section.text) %>
<%= form_tag wcc_contentful_app_engine.contact_form_path, remote: true, data: { contact_form: true }, method: 'post' do %> <%= hidden_field_tag :internal_title, section.internal_title %> <% if defined?(email_object_id) %> <% end %> <% section.fields&.each do |field| %>
<%= case field.input_type when 'email' content_tag(:input, nil, type: 'email', name: field.title, class: 'form-control', required: true) when 'textarea' content_tag(:textarea, nil, rows: 8, columnns: 80, name: field.title, class: 'form-control', minlength: 5, required: true) else content_tag(:input, nil, type: 'text', name: field.title, class: 'form-control') end %>
<% end %> <%= submit_tag section.submit_button_text || 'Submit', class: 'btn btn-primary', data: { disable_with: 'Submitting...' } %> <% end %>