This will be a slightly more complex example.
We will first run a CW program that generates a form of dropdown selections from an array. This dropdown HTML will be inserted into a canned form using the Include function.
The form itself will call a CW program to process the data.
To make things interesting, we will generate the form and process the form with the same CW program. This way we keep the logic for an application in the same place.
To avoid having to re-interpret the CW code, we will use the KeepAlive() function. So, the program will wait for the response from the user.
Because the program has several functions, we will not use a simple script, but will use several function declarations for the different functions.
The PutForm() function will generate the form and send it to the client.
The ProcessForm() function will process the results and report back to the client. It will then return without invoking KeepAlive() and thus will terminate.

First, we will set up to process the form with DropdownExample.cw. This is done in the usual manner. The extra problem here is that we need to specify the function call within the CW program. We specify this by supplying the "hidden variable" eppfunction and giving it the value "ProcessForm()". We do this in the usual manner.

Select Send to other. Then, press the Options button and fill in:

press OK and you will return to the parent dialog. Now, Advanced button, press Add and fill in:

Press OK, OK.
Now, we need to fill in the selection values. Let's let the CW program generate the values. We will accomplish this by placing a replaceable symbol - DDList - in the form. We will surround the symbol with some arbitrary markers so that our CW program can pick them out in the form and replace DDList with the value of DDList. Let's use *** to begin the sequence and *** to end the sequence. Note that whatever we choose, it must not occur in the form except to designate the beginning and ending of the symbol. Also, note that the symbol is taken to be a CW expression, so it could really be any expression, which will be evaluated and replaced.
So,
Since the CW program starts the process, let's begin with it