This is a custom form group example. It provide functionality to modify form group. In this example I modify form group for description to display form input without label.

	$categoryList= $this->getCategoryList();
	$Scaffolding= new Scaffolding("posts");
	$Scaffolding->join('categories', 'categories.id', '=', 'posts.category', 'INNER');
	$Scaffolding->setFormInputFiller("category", $categoryList);
	// Set columns properties
	$parameters= array(
	    array(
	    	'name'=>'no',
	    	'width'=>'1%',
	    ),
	    array(
	    	'name'=>'categories.name',
	    	'label'=>'Category',
	    	'width'=>'30%',
	    ),
	    array(
	    	'name'=>'title',
	    	'width'=>'49%',
	    ),
	    array(
	    	'name'=>'actions',
	    	'width'=>'20%',
	    ),
	);
	$Scaffolding->setColumnProperties($parameters);
	// Modify description form input
	$Scaffolding->setFormGroup('description', array($this, 'getFormGroupDescription'));
	$content= $Scaffolding->render();
	$parameters= array(
		'scaffolding'=>$content
	);
	return view('demo', $parameters);
	

This is callback for modify description form group.

	/**
	* Get form group description
	* 
	* @param  array $column
	* @param  \App\Libraries\Scaffolding\ScaffoldingTable $Scaffolding
	* 
	* @return  string
	*/
    public function getFormGroupDescription($column, $Scaffolding)
    {
    	echo '
'; echo $Scaffolding->getFormInput($column); echo $Scaffolding->getFormInputError($column['name']); echo '
'; }
Cancel