Prefill a form with parameters
Before you start
Prefill a form so people start with the right values already in place, for example a purchase request that opens with the department filled in. You can set the values in the form itself, with form parameters, or in the link that opens the form.
Add a form parameter
Section titled “Add a form parameter”- Open the Forms tab of the module and click Form rules. The Form Settings panel opens.
- Click Add Parameter. A box appears.
- In Form field name, choose the field to fill, for example Department.
- In Smart script to set value to, write the value, for example
'Procurement'. - Click Save in the panel, then Save on the form.
Add one parameter per field. The bin icon at the start of a box removes it. Give every parameter a field and a value, so the save check has nothing to flag.
The value is a Smart ScriptSmart ScriptBeezr's scripting language (engine name Beezl) used in fields, rules, filters, workflow values and dashboards.Open glossary ↗. A quoted text such as 'Procurement' gives a fixed value. Plain text without quotes works as a fixed value too.
Prefill from the link
Section titled “Prefill from the link”Add the field’s system name and its value to the link that opens the form:
add.xhtml?moduleId=12&department=FinanceOn a public form add the same pair after the FORM_KEY:
published/public-form.xhtml?FORM_KEY=abc123&department=FinanceThe system name is shown under the label of each field card in the Form builder. A Button with the action Dynamic Form fills the form it opens in the same way: its URL Parameters pair a Target form field to fill with a Source field / value. See Add a button to a form.
Which value wins?
Section titled “Which value wins?”If the link carries a value for a field, that value is used. If it does not, the form parameter fills the field. A field with neither starts with its own default value, or empty.
What should I know before I start?
Section titled “What should I know before I start?”- Use the system name in links, such as
department, and not the label. - Pick the field from the list in Form field name so the name is spelled correctly.
- Test the form with a new record after you save, so you see the defaults people see.
Check yourself
What's next
Last checked