v0.9.0 - Form Builder
Using #form_builder
you can access some utility methods to build labels and inputs:
class ExamplePage
include Blueprint::HTML
def blueprint
form_builder action: "/sign-in", method: :post do |form|
form.label :email
form.email_input :email
form.label :password
form.password_input :password
end
end
end
puts ExamplePage.new.to_s
# <form action="/sign-in" method="post">
# <label for="email">Email</label>
# <input type="email" id="email" name="email">
#
# <label for="password">Password</label>
# <input type="password" id="password" name="password">
# </form>
More examples at docs: https://stephannv.github.io/blueprint-docs/handbook/forms/