aurovrata / cf7-grid-layout

A WordPress plugin extension for Contact Form 7 to design responsive grid-layout forms.
https://wordpress.org/plugins/cf7-grid-layout/
GNU General Public License v2.0
6 stars 7 forks source link

Refactor repetitive field constructs #29

Open aurovrata opened 2 years ago

aurovrata commented 2 years ago

Capture additional fields in JSON objects with hidden input fields for each table or tabular construct.

Currently each repeated field name is appended with a tab/row suffix in order to ensure all rows/tabs are submitted properly in the backend.

This gives rise to 2 inconvenient issues, 1- rows are added/removed in FILO order, while a number of users have requested random order, allowing for a delete button on each row and possibly an add button on each row. 2- consolidation of data in the backend while preserving the CF7 field tag integrity has been a challenge and requires complex manipulations.

Separating the initial field in each row from subsequent rows using a JSON object construct would also ease retaining the row relation of each data field values. Each table would have a single hidden input field with an encoded JSON object updated dynamically on each field change.

Submission would allow data to be handled by the plugin in a simpler way, allowing for simplified consolidation and validation process.

Tables within tabs would need to be stored with nested JSON objects.

aurovrata commented 2 years ago

@StrangeTechDevTeam given that you seem to have explored the code, I was wondering if you would be interested to collaborate on the v5.0 roadmap.