Index
Examples
Download
Document
About us
Language:
Powered by PhpGrid | Template designed by Redline(Spinz )
Document
Sample
basic:One SQL staement
basic:Specify the table name and field name
basic:sql query
basic:Display Control
basic:Hide rows
basic:Form
basic:Access control
general:Form field type
general:Form the column control
general:Additional properties of the form fields
general:Validation
general:WYSIWYG editor,
general:Display more than one grid
general:Replacement of the skin
advanced:Customize the display data
advanced:Custom form fields
advanced:Overloaded form
Links
Code:
tables = "`customer`"; //aim to-> SELECT `cus_id` ,`cus_name`,`cus_address`,`cus_phone` FROM `customer` $expamle->fields = array("cus_id","cus_userid","cus_name","cus_email","cus_dept","cus_address","cus_phone","cus_pic","cus_memo"); $expamle->fieldDisplays = array("cus_name"=>"Customer's name", "cus_userid"=>"User", "cus_email"=>"Email", "cus_dept"=>"Department", "cus_address"=>"Address", "cus_phone"=>"Phone", "cus_pic"=>"Pictrue", "cus_memo"=>"Memo"); $expamle->title = "List of customer"; $expamle->formTable = "`customer`"; $expamle->formFields = $expamle->fieldDisplays; $expamle->formColsNum = 1; //Set the form for a few columns $user_list = array(1=>"Mark",2=>"Jockson",3=>"Tom",4=>"Sun"); $expamle->formTypes = array('cus_name' =>'text', 'cus_email' => 'text', 'cus_address' => 'simple_editor', 'cus_memo' => 'fckeditor', 'cus_pic' =>'file', 'cus_phone' =>'text', 'cus_userid' => array('select',$user_list), 'cus_dept' => array ('list',array (1=>'HR',2=>'Information',3=>'BI')) ); //use livevalidation1.3 javascript libary //how to use? See http://livevalidation.com/ $expamle->formFieldsValidates = array("cus_name"=>"Presence", "cus_userid"=>"Presence", "cus_email"=>"Email", "cus_phone"=>"Numericality, {minimum: 11}"); $html = $expamle->display(); ?>
Customers
back
, Add form:
here
Click here to run