Guestbook 
 Freebok   Guestbook   Home   
 Login 
SidebarSitemap 
|  Management  |  Help  |  Discussion  | 
  

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:

TypeField nameMax leng.Description
checkboxprivate(value = 1)Selected => private message
textname64Writers name
textemail64Email address
textcity64City
texthpName128Homepage name
texthpURL128Homepage address (URL)
texttext164Free text 1
texttext264Free text 2
texttext364Free text 3
selectselection1 Free selection field 1
selectselection2 Free selection field 2
textareamessage(5 kb)Message

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.

Required fields

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">