2022.1

Table Of Contents
The scripts in the Thank you folder only affect the thank_you Web page; on the form Web
page, nothing matches their selectors.
Tip
Hover over the name of a script in the Scripts pane to highlight parts of the template that
are affected by the script.
l Most of the scripts in the Thank you folder directly insert data that were submitted via the
Web form; see "Inserting variable data directly (drag-and-drop)" on page847.
l The Snippets script (also in the Thank you folder)loads two snippets, depending on the
values of two data fields (see "Loading a snippet via a script" on page945). Note that it
selects the table, in order to insert the snippet after the table (via results.after();
see "after()" on page1432).
l The Year script puts the current year in the footer of both Web pages.
For more information about writing scripts, see: "Writing your own scripts" on page918.
The Workflow configuration
The project's Workflow configuration contains just one process: an OL Connect Web process
(see "Web processes with OL Connect tasks" on page192).
Its NodeJS Server Input task has two HTTP Action entries: form and thank_you. This means
the process will be triggered when the server receives a request that ends with either /form or
/thank_you.
The request is saved to an XML file, which becomes the job file.
The Text Condition task checks if the request's header is thank_you. (For the function that is
used to read the header from the job file, see: XML data selections.)
If it is, the tasks in the branch run. The submitted data are merged with the thank_you Web
section and saved in Workflow's Data Repository.
Otherwise the main branch renders and returns the web form.
Note how the Section setting in the Create Web Content tasks determines which web page is
outputted (double-click the task to open the properties).
The Delete task is an Output task that does nothing, actually; it doesn't even remove anything.
However, this step is useful when running the project step by step in Debug mode. When it is
Page 175