%%= form_with(model: <%= model_resource_name %>) do |form| %>
<% attributes.each do |attribute| -%>
<%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", class: "form-control" %>
<%%= tag.div <%= singular_name %>.errors[:password_confirmation].first, class: "invalid-feedback" %>
<% elsif attribute.attachments? -%>
<%%= form.label :<%= attribute.column_name %>, class: "form-label col-md-3 col-form-label" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "form-control" %>
<%%= tag.div <%= singular_name %>.errors[:<%= attribute.column_name %>].first, class: "invalid-feedback" %>
<% elsif attribute.field_type == :check_box -%>
<%%= form.label :<%= attribute.column_name %>, class: "form-check-label col-md-3 col-form-label" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "form-check-input" %>
<%%= tag.div <%= singular_name %>.errors[:<%= attribute.column_name %>].first, class: "invalid-feedback" %>
<% else -%>
<%%= form.label :<%= attribute.column_name %>, class: "form-label col-md-3 col-form-label" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "form-control" %>
<%%= tag.div <%= singular_name %>.errors[:<%= attribute.column_name %>].first, class: "invalid-feedback" %>
<% end -%>
<% end -%>
<%% end %>