Form class

Class form is designed for working with form fields. The class has static fields available for reading only.

It is useful to check form fields for being empty and edit available database records with such an approach:

^if($edit){
# record from database
    $record[
^table::sql{… where id=…}]
}{
# new record, error (some fields are empty) output
# form fields
    $record[$form:fields]
}
<input name="age" value="$record.age" />


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 20.09.2007