ActionView::Helpers::FormTagHelper
checkbox_tag
API docs (Rails 8.1.4.1) ↗Alias: check_box_tag
def checkbox_tag(name, value = "1", checked = false, options = {})
Description
Creates an <input> with type="checkbox" that is not tied to a model.
ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Interacting with the preview updates the form submission.
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params