Hi all!
I have some questions…
My app has a Form Container with some inputs. So far, so good.
I wanted to know what is the best practice for interacting with forms:
-
Is it better to have a form to create a new product and another to edit the product or do I just use one form to handle both cases (using variables and conditionals)?
-
Do I configure the inputs to change a variable in the “onchange” and then update the backend or do I get the value directly from the inputs when saving?
-
In the database I have an array of objects with “question” and “answer” keys and how do I load the number of entries referring to this object?
- If I link to the array I lose the input variables.
I ask all this because I noticed something that could help the community: What if the Form container had a built-in variable that would be an object of all inputs where the keys would be labels (or placeholders) and the values would be the responses. Does this make sense to any of you?
Thanks in advance!