<%= form_with model: @section, url: character_character_sheet_sections_path(@character) do |f| %> <%= f.hidden_field :parent_section_id, value: @parent_section&.id %> <%= f.label :name %> <%= f.text_field :name %> <%= display_form_errors(@section, :name) %> <%= f.submit button_text %> <% end %>