I was able to create dynamically the form fields by retrieving them from the database by using this as a guide:
How can I dynamically generate a form's XML from PHP?
I just want to know on how get and set values for the custom fields?
also, I want to convert them to JSON format to store in a database field.
Here is my current situation:
My requirement is to make a form dynamic as possible by means of:
Adding custom fields to the edit form depending on the set-up on the back-end: - On the back end, I have a Reports Table, and then I have a Fields table which has a foreign key associated with Reports. Every time I add an item in the Fields table, i have a toggle column to indicate whether that Field I added will be added as a custom field when choosing a report.
If example I have a Regions field as a line item to a report, when I select the report, I will need to add the custom Regions field as an additional selection.