To display the form on a module in CRUDBooster also prepared in the framework of what we call the "Form Scaffolding".

Available Key

NameDesc
labelRequired. This key is used to display the name of the column form
nameRequired. Key is used to determine the field system tables used in the relevant column
typeRequired. Key is used to specify the type of element you want to appear on the form include: text, textarea, password, number, wysiwyg, etc.
validation

Optional. This key is used to provide validation. You can fill this validation by the rules of Validasi Laravel

E.g :

"validation"=>"required|string|min:3|max:50"
width

Optional. This key is used to adjust the column width. Key implements on bootstrap grid system. So you have to fill the grid in the bootstrap class.

E.g : 

col-sm-9

placeholderOptional. This key is used to display the existing placeholder in the HTML 5 Form Input.
helpOptional. This key is used to display text field below.
valueOptional. This key is used when you want to manually set the value column (default).

Available Type

checkbox

To use this type you MUST create a field of type string / varchar

Options : 

NameDesc
dataenum

This key is used if you want to show your own value.

E.g : 

"dataenum"=>"Label 1;Label 2;Label 3"

Check the selected will be stored in the form of strings separated by a semicolon ";"

E.g :

"dataenum"=>"0|Label 1;1|Label 2;3|Label 3"

The Dataenum will create value and meaning of different labels. Check the selected will be stored in the form of strings separated by a semicolon : 
E.g : 

0;1;2
datatable

Key is used if you want to display data from a relational table (other tables).

E.g  :

"datatable"=>"category,name"

If you use this key, be sure to read the key datatable_where, and relationship_table

datatable_where

Optional.it is used to add conditions to the DataTable query. MANDATORY using the key "DataTable" before using this key.

E.g  : 

"datatable_where"=>"id != 2"
relationship_table

This key is used to determine the relation table that will be used as a checklist of data storage table. (Many To Many Relationship Table). MANDATORY using the key "DataTable".

E.g : 

"relationship_table"=>"posts_category"
For DataTable key and dataenum, you should choose the one that will be used

Example 1 dataenum : 

$this->form[] = ['label'=>'Category','name'=>'category','type'=>'checkbox','dataenum'=>'1|Label 1;2|Label 2;3|Label 3'];

Example 2 datatable :

$this->form[] = ['label'=>'Category','name'=>'category','type'=>'checkbox','datatable'=>'category,name','relationship_table'=>'posts_category'];


child

This type of display sub table that can be filled Substance himself when added data or edit data.

Options : 

NameDesc
controller

Required. This key is used to determine the sub-controller / sub-module. Fill in the name of the controller. 

E.g : 

"controller"=>"AdminPostPhotosController"

Example : 

$this->form[] = ["label"=>"Photos","name"=>"photos","type"=>"child","controller"=>"AdminPostPhotosController"];


custom

This type can be used to display the form elements as you want. You can fill in the HTML itself to the element

Options : 

NameDesc
htmlRequired. You can fill it with HTML or view that you render in advance.

Example : 

$custom_element = view('custom_element')->render();
$this->form[] = ["label"=>"Label Name","name"=>"custom_field","type"=>"custom","html"=>$custom_element];


date

This mode will display the input text to bring up the option date "datepicker". Date format: Y-m-d

Example : 

$this->form[] = ["label"=>"Publish Date","name"=>"post_date","type"=>"date","validation"=>"date"];


datetime

This mode will display the input text to bring up the option date and hour "datetimepicker". Format: Y-m-d H: i: s

Example : 

$this->form[] = ["label"=>"Publish Date","name"=>"post_date","type"=>"datetime","validation"=>"date_format:Y-m-d H:i:s"];


email

This type of data will display the specific input email. You have to distinguish the type of text and email. With this type of system will be able to validate the email before the data is sent by the user.

Example : 

$this->form[] = ["label"=>"Member Email","name"=>"email","type"=>"email","validation"=>"email"];


filemanager

This type is used to upload files / images with added features File Manager.

Options : 

NameDesc
filemanager_typeRequired. Fill in the "file" or "image". This key is used to specify the File Manager which is used exclusively for general file or to Fig. Because File Manager will display different display formats.
FileManager is an additional plugin from UniSharp

Example : 

$this->form[] = ["label"=>"Member Photo","name"=>"photo","type"=>"filemanager","filemanager_type"=>"image"];


googlemaps

This mode will display a map of google. Suitable if you have the latitude and longitude fields. Before you use this type, you MUST fill KEY API for Google Maps in the menu "Settings -> Application Settings"

Options : 

NameDesc
latitudeRequired. Fill this key with a field of latitude
longitudeRequired. Fill this key with a field of longitude
addressOptional. You can add this key to the contents of the address field. Later address will automatically be filled if it changes the location from the map.

Example : 

$this->form[] = ["label"=>"Map","name"=>"map","latitude"=>"latitude","longitude"=>"longitude","address"=>"address","type"=>"googlemaps"];


header

This type is used to display the title element

Example : 

$this->form[] = ["label"=>"Detail Data","type"=>"header","name"=>"detail_data_header"];


hidden

This type is used when you want to create a hidden input. Normally it should be followed by key value

Example : 

$this->form[] = ["label"=>"Active","name"=>"is_active","type"=>"hidden","value"=>1];


money

This type is used if you want to make a direct input text that has the formatting money

Example : 

$this->form[] = ["label"=>"Balance","name"=>"balance","type"=>"money"];


number

This type is used if you show the field of numbers.

Example : 

$this->form[] = ["label"=>"Total Person","name"=>"total_person","type"=>"number"];


password

This type is used if the field you indicate on the password / PIN. CRUDBooster system will automatically perform hashing the password string you when stored.

Example : 

$this->form[] = ["label"=>"Password","name"=>"password","type"=>"password"];


radio

This type is used to make selections or radio button.

Options :

NameDesc
dataenum

Required. This key is used if you want to show your own value.

E.g : 

"dataenum"=>"Label 1;Label 2;Label 3"

Check the selected will be stored in the form of strings separated by a semicolon ";"

E.g :

"dataenum"=>"0|Label 1;1|Label 2;3|Label 3"

The Dataenum will create value and meaning of different labels. Check the selected will be stored in the form of strings separated by a semicolon, too. Saved is valuenya.
E.g : 

0;1;2

Example : 

$this->form[] = ['label'=>'Gender','name'=>'gender','type'=>'radio','dataenum'=>'Man;Woman'];


select

This type is used to create the select elements

Options :

NameDesc
dataquery

This key is used if you want to create a separate SQL query to select data display. Is a mandatory requirement in the query must produce "label" and "value".

E.g : 

"dataquery"=>"select id as value,name as label from category"
dataenum

This key is used if you want to show your own value.

E.g : 

"dataenum"=>"Label 1;Label 2;Label 3"

Check the selected will be stored in the form of strings separated by a semicolon ";"

E.g :

"dataenum"=>"0|Label 1;1|Label 2;3|Label 3"

The Dataenum will create value and meaning of different labels. Check the selected will be stored in the form of strings separated by a semicolon :  
E.g : 

0;1;2
datatable

This key is used to display data from a relational table.

E.g : 

"datatable"=>"category,name"

From the example above will generate html as follows:

...
< option value='1'>General< /option>
< option value='2'>Billing< /option>
< option value='3'>Support< /option>
...
datatable_where

This key is used to add query conditions on the DataTable. MANDATORY using the key "DataTable".

E.g : 

"datatable_where"=>"id != 2"
datatable_format

This key is used to manipulate the appearance of the label on the tag option. The format of such uses using the concat function in a SQL query. MANDATORY using the key "DataTable".

E.g: 

"datatable_format"=>"id,' - ',name"

Output : 

...
< option value='1'>1 - General< /option>
< option value='2'>2 - Billing< /option>
< option value='3'>3 - Support< /option>
...
parent_select

This key is used when you want to select a hierarchy. Examples of simple cases that can be applied to this key is the case of provincial elections -> City -> Districts.

Then you should apply parent_select key to "select" the District and the City.

Select Subdistrict -> parent_select = id_kota

Select City -> parent_select = id_provinsi

E.g: 

"parent_select"=>"id_kota"

For the selection of key dataquery, DataTable and dataenum, you must choose one adjust to your needs.


select2

This type is the kind that use plugins select additional Select2. Select2 can search the data directly on the select element, so as to facilitate the selection of data by the user.

Options :

NameDesc
dataenum

This key is used if you want to show your own value.

E.g : 

"dataenum"=>"Label 1;Label 2;Label 3"

Check the selected will be stored in the form of strings separated by a semicolon ";"

E.g :

"dataenum"=>"0|Label 1;1|Label 2;3|Label 3"

The Dataenum will create value and meaning of different labels. Check the selected will be stored in the form of strings separated by a semicolon, too. Saved is valuenya.
E.g : 

0;1;2
datatable

This key is used to display data from a relational table.

E.g : 

"datatable"=>"category,name"

From the example above will generate html as follows:

...
< option value='1'>1 - General< /option>
< option value='2'>2 - Billing< /option>
< option value='3'>3 - Support< /option>
...
datatable_where

This key is used to add query conditions on the DataTable. MANDATORY using the key "DataTable".

E.g : 

"datatable_where"=>"id != 2"
datatable_format

This key is used to manipulate the appearance of the label on the tag option. The format of such uses using the concat function in a SQL query. MANDATORY using the key "DataTable".

E.g : 

"datatable_format"=>"id,' - ',name"

From the example above will generate the following html:

...
< option value='1'>1 - General< /option>
< option value='2'>2 - Billing< /option>
< option value='3'>3 - Support< /option>
...

For DataTable and dataenum, you must choose one adjust to your needs.


text

This type is a text input format

Example : 

$this->form[]  = ['label'=>'Title','name'=>'title','type'=>'text'];


textarea

This type is a format for textarea

Example : 

$this->form[] = ['label'=>'Content','name'=>'content','type'=>'textarea'];


time

This mode allows you to time-related field. Will produce the output: H: i: s

Example : 

$this->form[] = ['label'=>'Publish Time','name'=>'publish_time','type'=>'time'];


upload

This mode allows you to fields that apply to upload files or pictures. You can also add the validation in the form of "image" field when you are dealing with data photo.

Example : 

$this->form[] = ['label'=>'Photo','name'=>'photo','type'=>'upload','validation'=>'required|image'];


wysiwyg

This type is used when you want to display a textarea that has text formatting.

Example : 

$this->form[] = ['label'=>'Content','name'=>'content','type'=>'wysiwyg'];