I’m struggling to understand the current approach to Create (via forms) and Update (using text inputs, custom forms?) for database items, which seems a bit confusing.
As far as I understand, when I select an item from a list, I can only input its information into text inputs, not directly into a form (which fundamentally has embedded Text Inputs).
BTW, this user experience feels awkward because the originating list component first requires a link action to a page. Once this action exists, it can create a ‘Change Input’ action, on the originating page, if the receiver is a text input—but not if it’s a form.
Considering we almost always use forms to create items, wouldn’t it make more sense to allow these forms to also receive information for updates? It is extremely inefficient to reconstruct every form into custom bundles of text inputs just to enable editing capabilities.
Moreover, within the form itself, the only option available initially is “Create”. However, in the submit button actions, we can choose “Update”, which doesn’t seem consistent.
Am I misunderstanding something here? If so, please clarify how this should be properly set up. Alternatively, am I highlighting a potential gap or oversight in the system that needs addressing?
Thanks for any insights or guidance you can provide.
Upon further examination, it appears that if you configure a button action on a list item to link to a page and choose to send data as “Current My_Element” in the link action, you can then set up a new form on the destination page to Update.
By selecting “Update” in the receiving form settings (“What do you want the form to do?”), the submit button action of the form is automatically configured to “Update,” and during runtime testing, it indeed populates the form with the selected incoming item’s data.
However, this setup necessitates duplicating forms for Create and Update purposes (Though the original form, set as a Create, can be copied & pasted and then configured to Update instead), which is not ideal.
IMO, ideally, there should be a way to conditionally set the form to either Create or Update mode based on certain conditions (e.g., using a User db field like “Edit mode” which can be set to either Edit or Create at runtime). An alternative, more implicit mechanism might involve the form automatically entering Create mode if there is no incoming data from the previous screen that fits the form element type.
If you build the form yourself using input fields, rather than form component, you can conditionally update or create as you say.
On the update action click ‘advanced’ at the bottom, and have it happen ‘sometimes’. Then you can set the condition. So your button will have 2 actions, one is create one is update, and they have conditional logic which should execute.