ajaxCRUD.com
» a PHP class to Create, Read, Update, & Delete from a mysql database table using AJAX
by loud canvas mediaAjaxCRUD Class Documentation / Reference Material
|
<< Reference overview << Home Object: ajaxCRUDConstructorFunctions
Variables |
defineAllowableValuesdefine "allowable" values for a field.
void defineAllowableValues ( String fieldName, String[] validValues, [ onedit_textbox = FALSE ] )
These allowable fields will display in a dropdown of the values you specify. You can have the values for the dropdown be the same as the text or separate. Both examples are provided below.
In addition, you can use the third parameter (optional) to allow fields (after being inserted) to NOT have only the allowed values permissable. If set to TRUE then a regular textbox will appear when editing this field--allowing any values. Details
Parameters
ExampleWith id and value the same
With id and value different
See also |
"I have been using php like 5 years ago, but it feels like it is 20 years ago :-) Now I have found an incredible module AjaxCRUD and damn, this is nice!"
~Joeri
