Creating the 'Sign the Guestbook' -page with Template layout
Create a form as follows:
<form method="POST" action="$writeAdd">
In form you can use the following INPUT -fields:
|checkbox||private||(value = 1)||Selected => private message|
|text||hpURL||128||Homepage address (URL)|
|text||text1||64||Free text 1|
|text||text2||64||Free text 2|
|text||text3||64||Free text 3|
|select||selection1|| ||Free selection field 1|
|select||selection2|| ||Free selection field 2|
You can set the default values for the fields (excluding the selection fields) by referencing the field names. e.g.
<input name="name" maxlength="64" type="text" size="40" value="$message.name">
When the user first comes to the write page, all the values are empty. When the form is submitted and there occurs an error (a required field was missing, or some other error), the field values are set to whatever the user wrote to them, so he/she doesn't have to retype them.
If you want that the visitor has to fill some question fields, add the field names to the form as hidden fields as follows: Field name+"Req", value="1".
E.g. The field 'name' is required:
<input name="nameReq" value="1" type="hidden">