Intermediate Demonstration
This is an example of an intermediate form. Try out all of the form actions and see how it works, then scroll down to see the source code and template used.
Source Code
This code is a slighlty more advanced example of a dbForm.
The parts of note are:
- alwaysUpdate
Forces the record to be updated on select or new actions - setFieldTitle
Sets the field titles for fields. Note that the field titles are now all Uppercase first letter and followed by colons (:). This is done with 2 commands only for the sake of example. - setFieldAttributes
Sets attributes of fields.
The first command sets all fields to have a style that makes them display in red, while the second overwrites this style attribute for the searchid and instead sets the fields width to 400 pixels. - setButtonAttributes
Sets attributes on buttons.
This command is being used to make all of the buttons appear the same width.
View source code for demo2.php
Template File
This template is basically the same as the one used by the Basic Demo, however it does include the javascript file for the autoSelection
View source code for demo2.tpl
Download Demo files
The files that have been used in this demonstration can be downloaded so you can try them out for yourself.