<%= form_with(model: participant, local: true, html: { class: 'needs-validation', novalidate: true }) do |form| %> <% if participant.errors.any? %> <% end %>
<%= form.label :first_name, 'First Name', class: 'form-label' %> <%= form.text_field :first_name, class: 'form-control' %>
<%= form.label :last_name, 'Last Name', class: 'form-label' %> <%= form.text_field :last_name, class: 'form-control' %>
<%# Address Line 1 Field %>
<%= form.label :address_line_1, 'Address Line 1', class: 'form-label' %> <%= form.text_field :address_line_1, class: 'form-control' %>
<%# Address Line 2 Field %>
<%= form.label :address_line_2, 'Address Line 2', class: 'form-label' %> <%= form.text_field :address_line_2, class: 'form-control' %>
<%# City Field %>
<%= form.label :city, class: 'form-label' %> <%= form.text_field :city, class: 'form-control' %>
<%# State Field %>
<%= form.label :state, class: 'form-label' %> <%= form.text_field :state, class: 'form-control' %>
<%# Zip Field %>
<%= form.label :zip, 'ZIP', class: 'form-label' %> <%= form.text_field :zip, class: 'form-control' %>
<%= form.label :phone, class: 'form-label' %> <%= form.telephone_field :phone, id: 'phone-field', class: 'form-control', placeholder: '(XXX)XXX-XXXX' %>
<%= form.label :email, class: 'form-label' %> <%= form.email_field :email, id: 'email-field', class: 'form-control', required: true, placeholder: 'Make sure to include @ sign' %>
<%= form.label :is_employer, 'Is this participant also an employer?', class: 'form-label' %>
<%= radio_button_tag 'is_employer', 'yes', true, class: 'form-check-input' %> <%= label_tag 'is_employer_yes', 'Yes', class: 'form-check-label' %> <%= radio_button_tag 'is_employer', 'no', false, class: 'form-check-input' %> <%= label_tag 'is_employer_no', 'No', class: 'form-check-label' %>
<%= form.label :mci, 'MCI', class: 'form-label' %> <%= form.text_field :mci, class: 'form-control', placeholder: 'Required for Participant', maxlength: 10, pattern: "\\d{10}", oninput: "validateMCI(this)" %>
<%= form.label :dob, 'Date of Birth', class: 'form-label' %> <%= form.date_field :dob, class: 'form-control' %>
<%= form.label :ssn, 'Social Security Number', class: 'form-label' %> <%= form.text_field :ssn, id: 'ssn-field', class: 'form-control', maxlength: 11, placeholder: 'XXX-XX-XXXX' %>
<%= form.label :gender, class: 'form-label' %> <%= form.select :gender, ['Unknown', 'Female', 'Male', 'Non-Binary', 'Other'], {}, class: 'form-select' %>
<%= form.submit class: 'btn btn-dark' %>
<% end %> <%# This is to correct phone number entry %> <%# This is for auto resizing the address field %> <%# This is to require 1 @ sign for email entry %> <%# This is for Social Security formatting and # of digits %> <%# This is to auto complete the Employer field on hand entry %> <%# This is to change the Employer input field on Radio Button selection %> <%# This is to limit the MCI to 10 numeric digits on entry %>