Form setup
introduction sparklayer forms are built using a simple structure that helps you organise fields, create multi step experiences, and manage complex data β without making forms difficult to maintain this guide explains how forms are structured and how the main components work together π how forms are organised every form follows the same structure level description form the main container pages sections within your form fields individual inputs customers complete groups nested fields used to organise related data forms can be simple single page layouts or multi step workflows depending on your needs π pages pages divide your form into logical sections single page forms best for shorter forms where customers can see everything at once multi page forms use multiple pages when you have lots of fields you want clearer progress through the form you want to break content into manageable steps page properties property what it controls title heading shown to customers page order controls the form flow π§© fields fields are the core building blocks of your form β each one collects information from the customer common field properties setting description label field name shown to customers description optional help text required makes the field mandatory placeholder hint text inside the field default value pre filled content read only prevents editing validation rules applied to input fields can be top level β placed directly on a page nested β inside groups or containers repeatable β allowing multiple entries ποΈ groups & nested fields groups help organise related information together example contact information \ first name \ last name \ email why use groups? keep layouts clean structure complex data easily apply display logic to multiple fields in one go improve form readability repeatable groups repeatable groups allow customers to add multiple items β useful for things like order lines locations team members customers can add new entries remove entries reorder entries π€ field ids (advanced) every field has an internal id used for conditional logic workflows data references best practice use clear, consistent naming keep ids simple and readable prefer short ids which helps to keep template references short π how form answers are stored when a customer submits a form, answers follow the structure you created examples structure example simple field email nested field contact first name repeatable group items\[instance1] quantity items\[instance1] sku items\[instance2] quantity items\[instance2] sku you typically wonβt need to manage this directly β but it helps when building workflows or automations π‘ best practices to keep your forms easy to manage group related fields together avoid overly long pages avoid multiple levels of nested groups use consistent naming