By: Eric Cressey
Technical Writer

Pre-populating form fields ensures that information is entered according to your company’s best practices, and it can make it much easier to fill out a form. In a previous tech tip, I described how to use URL parameters to pre-populate a form’s fields so that, when a user opens the form, those fields will already be filled in. In this tech tip, I’ll build on that information and describe how to use Laserfiche Workflow to dynamically generate Laserfiche Forms URLs with parameters.

Rather than manually appending URL parameters to Forms URLs, you can use Workflow to create Forms URLs with tokens as parameters. Consider the following example:

7-11-13 sampleworkflow

In this example, the Find User activity finds the user who should fill out a form. Then, the Assign Token Values activity creates a token called Forms URL using the base URL of the form followed by the URL parameter syntax for the Name and Email fields on the form — these values are filled by tokens from the Find User activity.

7-11-13 sampleworkflow2

The Email activity sends an email to the user from the Find User activity, and includes the Forms URL token in the body of the message.

7-11-13 sampleworkflow3

When the user opens the email and clicks the link, the form opens with the specified fields already filled in.

7-11-13 sampleworkflow4

Note: You can also pre-fill fields that are used in lookup and page rules, but you’ll need to include the following JavaScript on the Script page of the Form Designer to make the rules run when the user opens the form:

$(document).ready(function () {
$(‘#Field4‘).trigger(‘change’);
})

Replace Field4 with the appropriate field’s input box ID attribute. If the matched field’s id attribute is q4, its input box’s ID attribute will be Field4.

Using this method, you can email form links directly to users who need to fill out certain forms and have specific fields pre-populated, ensuring consistency throughout your business process.

Some of the products and services listed on the Laserfiche Solution Exchange were not developed by Laserfiche. The recommendations and opinions expressed on the Laserfiche Solution Exchange are those of the person or persons posting the recommendations only, and they do not necessarily represent Laserfiche's opinion or recommendation of the product or service being reviewed. Laserfiche disclaims all liability resulting from your purchase or use of any non-Laserfiche software product or service listed on the site.