Web form editor

Prefill webform fields

Sometimes, you want to prefill a field based on earlier information. For example, say you want to send a client a webform with their personal information already pre-filled for them. This can be done by setting the default value to Value from form. The default values can either be from earlier in the same webform or from a previous webform.

In the example of pre-filling client information, you would create a workflow with two webforms: the first to be used internally, the second to be shared externally with the client. In the client webform, set the default value to be that of any corresponding fields in the first webform. When the first webform is complete, Anvil will provide a link to the second webform which can be shared with the client.

Note that these values are set as default values for review and can be changed as a user is reviewing the fields with the default values. It is best practice to map the most recent webform fields in the workflow to the PDF.

Web form editor

Prefill from a previous field in the same webform:

Recommended for prefilling information given by the user.

1

How to navigate to the Workflow editor

2

Select the webform field you would like to prefill.

Prefill_1

3

Select 'More Options'.

When the field editor panel opens to the left of your webform, click the + More options button at the bottom of the panel and select default value from the dropdown.

Prefill_2

4

Select 'Value from form'.

Select the Value from form radio button option.

Note: you can use the literal value option to fill the field with a static text string or use template patterns for text replacement.

Prefill_3

5

Select webform field from dropdown.

From the dropdown, select the webform field you would like to fill this webform field from.

Note: only compatible field type will appear in the dropdown.

Prefill_4




Prefill from another webform:

Recommended for prefilling information on behalf of another user.

1

Add a webform.

How to add a webform to a workflow

2

Set access controls for the first webform.

Set the role access control of the first webform to [Organization name] members only. This will be the form you internally prefill for your other user. Keep the other webform’s access control to Anyone can fill this form (default). This will be the form your user sees and is able to edit. Learn more about setting access controls on a webform.

3

Select the webform field you would like to prefill.

Prefill_1 copy

4

Select 'More Options'.

When the field editor panel opens to the left of your webform, click the + More options button at the bottom of the panel and select default value from the dropdown.

Prefill_2 copy

5

Select 'Value from form'.

Select the Value from form radio button option.

Note: Only fields that show up before the currently selected field and also match the type of the current field can be used. You can also use the literal value option to fill the field with a static text string or use template patterns for text replacement.

Prefill_3 copy

6

Select webform field from dropdown.

From the dropdown, select the field you would like to fill this one. Make sure it is a field from the members only webform you created.

Note: only compatible field type will appear in the dropdown.

Prefill_4 copy

7

Publish the workflow and start a new submission.

Prefill_5

8

Fill the first webform.

Fill out your user's information on the first webform that appears.

Prefill_6

9

Once you Finish & Submit this form, the confirmation page will prompt you to copy the link to the rest of the webforms that will then be pre-filled with the information you just submitted.

Prefill_7

Back to Help Center

Related Articles

Add multiple webforms to a workflow

Add access control to a webform

Add a default value to a webform field

Ready to upgrade your paperwork?

Create workflows from your existing PDFs, or fill, generate, and sign PDFs from your app via our API. Start automating your paperwork today.