Usual implementation can look like this
<?php // Include classes include_once 'php/jqUtils.php'; include_once 'php/jqForm.php'; // Create instance $myform = new jqForm(); $myform->encoding = 'utf-8'; ... ?>
Type | Names | Description | Default | Access |
---|---|---|---|---|
string | inputclass | Set a commom class to all input elements | ui-widget-content ui-corner-all | public |
string | SelectCommand | Defines the select command for obtaining the data from the database. This command can contain any valid SQL syntax. With this command we fill the form is the record can be found. In the command is possible to use parameters which can be set later in the render method. Example: SELECT field1, field2 FROM table WHERE field1 = ? |
empty string | public |
string | table | The table where the data submitted from the form will be stored. The class autoamticaly detect if the record should be inserted or updated based on the primary key set | empty | public |
string | oper | Determines the operation when ajax is in action and after the form is rendered into the DOM. Currently we have following operatin: no, get, save | empty | public |
string | DbDate | The date format used in the database to store the date | Y-m-d | public |
string | DbTime | The time format used in the database to store the time | H:i:s | public |
string | DbDateTime | The datetime format used in the database to store the datetime | Y-m-d H:i:s | public |
string | UserDate | The date format used in client side to show the date | Y-m-d | public |
string | UserTime | The time format used in client side to show the time | H:i:s | public |
string | UserDateTime | The datetime format used in client side to show the datetime | Y-m-d H:i:s | public |
boolean | serialKey | Determines if the primary key is serial (autoincrement) | true | public |
string | encoding | The encoding used in the database and response | utf-8 | public |
boolean | trans | Determines if the operation add/update in the table after posting the data to the script should be enclosed in transaction | true | public |
boolean | add | Detrmines if adding of data is enabled | true | public |
boolean | edit | Detrmines if updating of data is enabled | true | public |