to navigate
to select
esc to close
API Reference Intermediate

Form For Tag - Flexible Form Rendering

Flexible form rendering with complete HTML control and data binding

Overview

The form_for tag provides complete control over form HTML while handling data binding to collections and blueprints through a Form model.

Setup

  1. Create a Form in the admin with collection and blueprint settings
  2. Include {% cms_scripts %} in your layout

Basic Usage

{% form_for form: "contact-form" %}
  <input type="text" name="fields[name]" required>
  <input type="email" name="fields[email]" required>
  <button type="submit">Send</button>
{% endform_for %}

The Form Object

Access form properties including id, fields, errors, and previously submitted values for repopulation.

Security

Collection and blueprint are fixed server-side with built-in honeypot spam protection and server-side validation.