|
DataEdit
DataEdit syntax
Phase-Implementation Data Edit Syntaxsample
$edit = new dataedit_library();
$edit->label = 'Manage Article';
$edit->back_url = $this->url('filtered_grid');
$edit->source('articles');
$edit->field('input','title','Title')->rule('trim','required');
$edit->field('radiogroup','public','Public')->options(array("y"=>"Yes", "n"=>"No"));
$edit->field('dropdown','author_id','Author')->options('SELECT author_id, firstname FROM authors')
->rule('required');
$edit->field('date','datefield','Date')->attributes(array('style'=>'width: 80px'));
$edit->field('editor','body','Description')->rule('required');
$edit->buttons('modify','save','undo','back');
$edit->build();
$data['head'] = $this->head();
$data['content']= $edit->output;
properties
methods$edit->source($source)
$edit->field($type, $name, $label)
$edit->field($type, $name, $label)->attributes($attributes)
$edit->field($type, $name, $label)->rule($rule)
$edit->field($type, $name, $label)->options($options)
$edit->buttons($button1[,$button2...])
$edit->build() build dataedit, fill $edit->output | ||||||||||||||||||||||||||||||||||||||||||||
► Sign in to add a comment