Here's a complex sign-up Superform

# Everything below is intentionally verbose!
class SignupForm < ApplicationForm
  def view_template
    render field(:name).input.focus
    render field(:email).input(type: :email, placeholder: "We will sell this to third parties", required: true)

    render field(:reason) do |f|
      div do
        f.label { "Why should we care about you?" }
        f.textarea(row: 3, col: 80)
      end
    end

    div do
      render field(:contact).label { "Would you like us to spam you to death?" }
      render field(:contact).select(
        [true, "Yes"],
        [false, "No"],
        "Hell no",
        nil
      )
    end

    render button { "Submit" }
  end
end
25 / 39