Hello fellow Bubblers!
I’m building an app that allows my users to autopopulate their own document templates.
Let’s give an exemple to illustrate what I trying to make: my users’ job requires to write the same document over and over for their clients. This document is ALWAYS the same with the exception of two variables : the Name of the client & his Birthplace. Until now, easy to make.
Now, let’s imagine they have 100 document templates, each of them with a different number of variables.
My goal is to allow them to fill the variables in their templates easily. Microsoft Word -like.
Here is my database: [Data Type : - Field Name (Field Type)]
Users:
- Name (text)
- Email (email)
Templates:
- Name (text)
- User (User)
- Variables (List of Variables)
Variables:
- Name (text)
- Template (Template)
- User (User)
Values:
- Template (Template)
- Values (List of text)
Until now, I succeeded to retrieve the variables of a given template in a repeating group:
My main issue is now to save the values of the inputs in the repeating group and link them to the associated variables.
After spending several days testing a lot of different solutions (for exemple: a data type “values”(mentioned above but not working), or trying API call with JSON, etc), I really can’t figure out how to save these inputs.
To me, the best way to go would be the JSON solution (POST), but I don’t how to make it dynamic (as the templates never have the same variables nor number of variables)…
What would you do differently to save these inputs?
I really hope my request/question is intelligible