Connect a master data element to your table and get automatically a master data form!
Configure the list columns and the form with JSON to get it functionally and good looking!
The data access rights are easily configured in the backend and displayed in the master data form.
Listing record functions:
Crud functions:
Export functions:
Configuration functions:
The form is devided into two parts. In the top is the record list with filter and sorting. In the bottom the record is displayed and can be edited in the form. You can drag the line between to enlarge or shrink the listing.
Actually you can sort the displayed records. A callback for the server will be installed later.
this are the filters:
With drap & drop in the column header you can move the colum to the desired position.
Set the cursor between the columns. The Cursor changes to: <->By drag & drop you can adjust the column width.
Each record ist displayed in 1 line. The columns are defined in the datadefintion of tabulator. The following symbols display the rights of the user:
New empties the form. In future default values for the fields will be supported.
By clicking on the line the recordset is displayed in the form and can be edited. Independent from the displayed columns in tabulator the whole record already loaded in the row. A new load from the server is not necessary.
Cancel undos the changes and displays the original record.
Before saving the data a validation by jsonform is done. If its failed you first have to correct the values. In future the data-access-class will do a validation check for the fieldtype and the user rights. Other checks have to be progammed by yourself.
The user rights are implemented. If the ban is displayed, deletion is not allowed. After a confirmation question, the record will be deleted. The form displays an empty record.
Options:
You can download the displayed data in the desired format. If not all lines are displayed, please change the record read limit.
You can change the record read limit to an arbitrary value. The read limit is valid until you load a new page.
The Choose colmns dialog allows you to choose the displayed columns.
(only available when loogged in)
With "Save configuration" you save the choosen columns, the order of the columns and the the column width.
By reseting the configuration the default columns, its order and with is set to default.
For some special functions the selection of 1 line can be changed to multi line selection.
A table for master data has to fullfill the following rules:
The primary key is a hidden field in the master data form. It can not be changed!
Checkout the generation of a masterdata form on the fly:
Attention, generate a table is only allowed on this demonstration page. This functionality is normally turned off!
you can open the datadefintion as:
The datadefinition contains details for reading, saving and displaying a recordset.
The following steps are necessary to create your own datadefinition:
kitsamples/customerbasic/customerbasic.json:
The masterdata plugin offers this elements:
To add an edit function to the list, please look for the "edittype" beneath.
The return values of "masterdata" are:
Properties and sections:
To change the look of your masterdata form, please configure tabulator (list at the top) and k8form (form at the bottom)
JSON structure:
The key column is used for edit functions. If the key value is zero, it's a new record.
The backend adds automatically:
settings.masterdata:
recordset
This is an part of the customer tabulator definition:
The most often used column properties are:
For more details look to:
Columns can easily removed or added. if desired you change the order of the columns. If you extend the sql-statement, you can easily add the columns here.
This is an part of the customer k8form definition:
Thanks to the container property of k8form HTML layout can be managed and fieldsets or multiple block can be displayed.
masterdata/templates/datadefinition_k8form_2blocks.json:
Bootstrap needs 3 containers to create 2 blocks:
defaultvalues
The defaultvalues allows to set default values for a new record in the form.
clause
The clause allows to filter the data.
url_...
edittype
sql_derived example:
Please write the sql_statement or sql_derived in the datadefinition in one line (JSON compliant)! The "sql_derived" property is important by using the view with tabulator, otherwise the property "sql_statement" should be used because it's a little bit faster.
The placeholder are:
Alternatively the include "getEntries_sql" can be used to write the statement direct in php.
Extend the datadefintitions with call back functions:
the parameters:
masterdata/templates/tinymceset.js
Create your datadefintion JavaScript file. Copy the line from the template into your file and add your datadefID to the settings variable.
additional declarations in the datadefinition:
Use of Cookies
We use cookies to personalize content and ads, to provide social media features and to analyze access to our website. We also share information about your use of our website with our social media, advertising and analytics partners. Our partners may combine this information with other information that you have provided to them or that they have collected from your use of the Services.