Template Variable Replacement
Used for replacing identifying text information (data table fieldnames) and barcode information taken from the database to make each published and printed form unique (similar to mailmerge).
One of the great features of publishing forms in FormReturn is Template Variable Replacement (TVR). It allows you to create custom and personalised forms from a single form template. The form template will be published into a unique form for each record in the chosen data table.
A bit more of an explanation ...
When you create forms you start with a blank template. For instance, one exam is created as a form template and then "published" to create forms.
When running the publish action to create the forms, you can import data to the form query (eg, student records appear in the published forms).
A template variable replacement works like this: when you enter text into the editor, if you put <<fieldname>> within that text, the publish action will replace <<fieldname>> with the fieldname column's data.
Process:
- A publish action is performed, the database is queried for the records (student records) which will be used to create forms from the form template.
- The text in the form template... Dear <<firstname>> <<lastname>> is parsed during the publish action for field names that match the field names in the query.
- The published forms now show Dear John Smith, Dear Mary Jane, Dear Joe Smith which corresponds to the data that comes from the database.
