Add Row Form
Allow a user to add a row to a table by filling in a form displayed directly on the page, and the form is very customizable.
Outline Display: Present a form to the user that lets them add a row to {{tab}}.
The submit button will be labeled {{buttonText}}.
The form is defined by:
{{rowIngredients}}
{{submitAction:
In addition to writing to the table, we will do the following on submit:
{{submitAction}}}}Details
Form ingredients are composed sequentially: later fields can reference earlier fields via formulas. Key columns should use SequentialID. The optional submitAction runs server-side after the row has been inserted into the table, so it can reference the newly created row’s values.
Local scope
Names introduced within this component’s knobs:
tab– table chosen from the app’s schema (viatabknob)formFieldsTable– virtual table holding this handler’s parameters
Settings
Required
-
tab: table
The table to which the form will add a row -
rowIngredients: ingredient slot offormIngredients(tab, formFieldsTable)(many, untilformFieldsTable>=tab)
Descriptions for widgets or other ways of asking the user for information to construct a row in the table. Note that the order of the ingredients will be reflected in the order of the form and that there must be an ingredient to produce each column in the table. Key columns should use SequentialID. -
buttonText: constant value (type: text; required, non-nullable)
The text for the button that opens up the form modal
Optional
submitAction: ingredient slot ofrowActionsIngredients(tab)(many)
Any extra action(s) (in addition to writing the row to the table) to perform when the user submits a row