({{, (RefLink[FormLayoutFunction, paclet:ref/FormLayoutFunction]) 
is an option for (RefLink[FormObject, paclet:ref/FormObject]) and (RefLink[FormFunction, paclet:ref/FormFunction]) that can be used to specify how to lay out a form.}})

OpenersNotesSection(Spacer1)Details

(RefLink[FormLayoutFunction, paclet:ref/FormLayoutFunction]) is a pure function that is applied to the (RefLink[FormObject, paclet:ref/FormObject]) to extract the layout.

Various pieces of the layout can be extracted by either (RefLink[FormObject, paclet:ref/FormObject])[…][key], which extracts the complete field, or (RefLink[FormObject, paclet:ref/FormObject])[…][key,prop], where prop can be one of the following:

Other pieces of the layout are stored in the (RefLink[AppearanceRules, paclet:ref/AppearanceRules]) and can be accessed by using (RefLink[FormObject, paclet:ref/FormObject])[…][(RefLink[AppearanceRules, paclet:ref/AppearanceRules]),prop].

(RefLink[AppearanceRules, paclet:ref/AppearanceRules]) can contain arbitrary key-value pairs, but typical values of prop include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Create a custom layout and style the elements:

FormObject[{"name"->"String","date"->"Date"},FormLayoutFunction-> Function[Grid[{{Style[#["name", "Label"],Bold],#["name", "Control"]},{"birthday",#["date", "Control"]}},Alignment->Left]]]

Complete fields can be accessed by their key:

FormFunction["x" -> "Integer", func, FormLayoutFunction->Function[Column[{#["x"], "field"}, Alignment->Center]]][]

Single elements of the complete field can be individually accessed as well:

FormFunction["x" -> "Integer", func, FormLayoutFunction->Function[Row[{Column[{If[#["x", "Required"], Style[#, Bold]&, Identity][#["x", "Label"]], "label"},Alignment->Center], Column[{#["x", "Control"], "control"},Alignment->Center]}]]][]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[AppearanceRules, paclet:ref/AppearanceRules])  ▪  (RefLink[FormObject, paclet:ref/FormObject])  ▪  (RefLink[FormFunction, paclet:ref/FormFunction])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Form Structure & Layout, paclet:guide/FormStructureAndLayout])}, {▪(RefLinkPlain[Creating Form Interfaces & Apps, paclet:guide/CreatingFormsAndApps])}})}})