Skip to main content
New Participant
February 3, 2023
Solved

Why use Form Layout over Section Layout

I'm trying to figure out the differences between Form Layout and Section Layout. Mainly, is there any reason to use a Form Layout over a Section Layout? I've been using Section Layout because I seem to be able to do everything I need with it. I understand the notion of "well, if it works for what you need, then use it". I also understand that we have the ability to nest Section Layouts (which is one main reason why I use them), but not Form Layout. However, I still continue to wonder what the actual purpose of Form Layout is for. If there is a downside to using Section Layout in lieu of Form Layout.

mikes0011
mikes0011Answer
Brainy
February 3, 2023

Nominally, Form Layout is intended specifically to be a top-level container for Task Forms.  It contains a header label that's different from the section layout header, and its own buttons section which will always be bottom-oriented, and has its own form-level validations spot (though that's easy to replicate in an individual section as well).  The FormLayout may contain any number of nested sections (and/or other elements). 

Really these days it's optional, though I always use it for tasks to maintain a consistent Button style at the very least, as well as to get the top-level form header.

The Expression Guru

2 replies

mikes0011
mikes0011Answer
Brainy
February 3, 2023

Nominally, Form Layout is intended specifically to be a top-level container for Task Forms.  It contains a header label that's different from the section layout header, and its own buttons section which will always be bottom-oriented, and has its own form-level validations spot (though that's easy to replicate in an individual section as well).  The FormLayout may contain any number of nested sections (and/or other elements). 

Really these days it's optional, though I always use it for tasks to maintain a consistent Button style at the very least, as well as to get the top-level form header.

The Expression Guru
peter.lewis
Employee
February 3, 2023

Generally agree with Mike - in most cases they are the same. The two things that Form Layouts do that I'm pretty sure other components don't do are:

  • Allow you to specify if the form should focus on the first field or not
  • Allow you to have native button layout configurations for mobile

I can't think of anything else that couldn't be replicated in some other way using a section layout (or other components).