website logo
⌘K
Introduction
PORTAL
Agency Whitelabelling
PAGES
Pages - Accessing Page Data
Pagination Layouts
Page Templates
FORMS
Form Confirmation Pages
Adding a Progress Bar
Adding Custom CSS To Show Form Submit Process
Dynamic Content in Workflow and Autoresponder Emails
How to output Custom Field Set fields in a Form's Custom Layout
Custom JavaScript Validation for Forms
File Upload Previews
FAQ
CATEGORIES
Filtering WebApps and Modules by Categories
Outputting Categories on WebApp / Module / eCommerce Layouts
Outputting Category Fields in any Location
Category Detail Layouts
FAQ
COMPANY INFORMATION
Company Information
SITE SEARCH
Site Search
PUBLIC API/ZAPIER
Zapier - Formatting arrays correctly
Public API/Zapier Changelog
MODULES
Module Marketplace
Building Custom Modules
Siteglide Modules
Front-end Submit Modules
DATA STRUCTURES
Automations
Creating WebApps from the CLI
Field Types
WEBAPPS
Front-end Submit WebApps
Layouts
Search and Filtering
Understanding Custom Field Names and IDs
FAQ
CRM
User Details
User Secure Zones
Storing User's Favourite WebApp / Module Items
User's Form Submissions (Cases)
How Users Edit their Email and Password Front End
Editing a User's CRM record Front End with Custom Field Sets
CLI
Introducing Siteglide CLI
CLI Changelog
Secure Zones with CLI
Page Templates with Siteglide CLI
Pages with Siteglide CLI
Includes with Siteglide CLI
Managing Email Templates
Migrate - Manual Form setup
Migrate - Convert existing Forms
Liquid
Accessing Assets
Liquid Dot Notation
Using WebApp Collections- Tutorial
Using the current_user object with Secure Zones
Preventing Duplicate Content with Query Parameters- Canonical URL and Robots.txt
FAQ
GraphQL
Tutorial Overview
About GraphQL
Tutorial 1- Your First Query
Tutorial 2 - Pagination
Tutorial 3 - Filtering the Results
Tutorial 3 - Answers to the First Filtering Challenge
Tutorial 4 - Advanced Filtering
Tutorial 4 - Challenge Answers
Tutorial 5 - Using Liquid to run GraphQL queries on your Site
Tutorial 6 - Variables
Tutorial 6 - Answers to the Variables Challenge
Tutorial 7 - Sorting
Tutorial 8 - Building a Liquid API GET Endpoint Page powered by GraphQL queries
Best Practice and Performance
Module/WebApp Caching
Getting Started with Liquid Caching - to Reduce Server Response time and Improve Performance
Includes
ecommerce/checkout_standard
Frequently Asked Questions
Using Liquid Logic to Check if a field exists, or is empty on the Front End
How do I learn more about Liquid?
How to setup a multi domain start page
Docs powered by archbee 
17min

How to output Custom Field Set fields in a Form's Custom Layout

Default Form Layouts should be automatically updated with Custom Field Set fields. However, custom Form Layouts will need further syntax.

Prerequisites

Before reading this Article you should have already:

  • Created a Custom Field Set
  • Created a Form 
  • Added your Custom Field Set to the Form

Introduction

This Article shows you the extra syntax needed to include Custom Field Sets in a custom Form Layout. Updating the Form in Admin will automatically add the Custom Field Sets to your default.liquid Layout, so these will not need any maintenance. The easiest way to make sure your Custom Form Layout is displaying Custom Field Sets correctly may be to copy the code straight from your default.liquid Layout.

Identifying your Custom Field Set

Each Custom Field set has an unique ID. You can find this ID by viewing the Custom Field Set in the Admin, and reading the last number in the URL.

Each field within that Custom Field Set also has it's own ID. You can work this out by the position of the fields in the List when you inspect your Custom Field Set in Admin. In the example below- I have a Custom Field Set with an ID of 5 (displayed in the last slug of the URL)- and two fields:

  • Pizza Topping appears first in the List- so has an ID of 1
  • Gelato appears second in the List, so has an ID of 2
Document image

Syntax

We'll structure the sections of the Article by the type of field which needs to be displayed, because the key HTML attribute will be located on different elements depending on the field type. If the type does not fit any of the types here, you can use text.

When it comes to adding the data-cfsHTML attribute below, the first number should be the CFS ID and the second number the CFS Field ID. Finally, the type should be specified and preceded by the string "input_". E.g. data-cfs="5-1-input_text" 

Text

A text input should have the data-cfs attribute inside the <input> element. 

HTML
|

Textarea

The same applies for textarea inputs.

HTML
|

Checkbox

A Checkbox group should have the data-cfs attribute on the container for the entire group. <input> elements should be the grandchildren of this group. 

HTML
|

Radio

The same applies to a radio field. 

HTML
|

Dropdown

The data-cfs attribute should go on the <select> element itself, not on options.

HTML
|

File

The data-cfs attribute is on the hidden field, not on the element with type="file".

HTML
|
Updated 19 Oct 2021
Did this page help you?
Yes
No
UP NEXT
Custom JavaScript Validation for Forms
Docs powered by archbee 
TABLE OF CONTENTS
Prerequisites
Introduction
Identifying your Custom Field Set
Syntax
Text
Textarea
Checkbox
Radio
Dropdown
File