app/helpers/custom_form_helpers.rb
def draft_button(i18n_key, opts = {})
    html = Nokogiri::HTML.fragment(
      submit_button(i18n_key, opts)
    ).at(:input)

    html['name'] = 'commit_draft'
    html.to_html.html_safe
  end
# Kind of hackish but `govuk_submit` does not currently accept `name` attribute
Kind of hackish but `govuk_submit` does not currently accept `name` attribute
Kind of hackish but ` govuk_submit ` does not currently accept ` name ` attribute
def draft_button(i18n_key, opts = {})
    html = Nokogiri::HTML.fragment(
      submit_button(i18n_key, opts)
    ).at(:input)
    html['name'] = 'commit_draft'
    html.to_html.html_safe
  end
def draft_button ( i18n_key , opts = { } ) html = Nokogiri :: HTML . fragment ( submit_button ( i18n_key , opts ) ) . at ( :input ) html [ 'name' ] = 'commit_draft' html . to_html . html_safe end
Kind of hackish but `govuk_submit` does not currently accept `name` attribute
Kind of hackish but ` govuk_submit ` does not currently accept ` name ` attribute
i18n_key
opts