The data function provides a tabular view of entity records. This feature can also be used to create front-end editing capability by linking the data to a WPAS submit form.
Creating Data grids
Data grids are very useful to display entity records in a tabular format. Data grids provide more functionality compared to HTML forms. Users can sort, search, and export one or more records in different formats. WPAS data grids also offer a mobile view, ability to enable/disable user-selected columns, ajax based page navigation, and ability to create, update, and delete new records and more.
Datagrid tag function can be used to create advanced tabular displays without introducing complexity in entity or widget views
Function structure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#datagrid['Unique Name','Default Attr List seperated by semicolon','Default Attr Labels seperated by semicolon','Grid Type','Entity Name','Relationship Name','Relationship Type','Create New Entity with Relationship Form Name',Create Relationship]# |
Function example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#datagrid['tablerel2174','!#title#;!#featured_img#;!#ent_employee_email#;!#ent_employee_phone#;!#ent_employee_extension#;!#ent_employee_mobile#;!#tax_jobtitles#;!#entrelcon_from_manager#;!#entrelcon_from_executive_assistant#;!#entrelcon_employees_locations#;!#entrelcon_employees_departments#','Employee;Photo;Email;Phone;Extension;Mobile;Job Title;Manager;Assistant;Location;Department','R','emd_employee','!#entrelcon_to_manager#','connected','',1]# |
- Unique Name: An identifier which uniquely identifies this data grid.
- Default Attr List separated by a semicolon: The semicolon-separated list of attribute tags which will make up the value of this data grid.
- Default Attr Labels separated by a semicolon: The semicolon-separated list of attribute labels which will make up the column headers of this data grid
- Grid Type: The type grid which will be created. The default is R.
- Entity Name: The name of the main entity where the metadata comes from.
- Relationship Name: Set the relationship name if you want to use this data grid to create connections from the main entity to other entities. Leave it '' if not.
- Relationship Type: For con-relation, set it connected. For rel-relation, set it related.
- Create a New Entity with Relationship Form Name: Set the name of the submission form which will be used to create the main entity record. When set, the "Add New button" is displayed.
- Create Relationship: Set 0 for creating new relationship records using the submit form. Set 1 if you want to allow users to create relationships of only existing records.