We just pushed a feature that will help you save quite some time when building forms and simplify your apps. You can now bind an input to a field of thing.
Very often, you’ll find yourself building a form to modify an existing thing in the database, usually the thing of the group or the page. That means defining the initial content as ‘Parent Element’s thing’s field’, and then having workflows when the user changes the content of the input.
Now, you can select “Enable auto-binding on parent element’s thing” as the input level. If the input is in a group or a page that contains a thing (group coming before the page), you’ll be able to select which field you want to modify. Doing so, the input will automatically use the field value as the initial content, and will update the thing as the user changes the value of the input.
Please note that this feature requires a special permission in the privacy tab. As it doesn’t use the workflow engine, modifying things that way requires you to define who can modify which field for a given thing (usually the creator, etc.). If the privacy isn’t met, you’ll see an error message.
@emmanuel would you mind sharing an example of a use of case?
This is what I understand: so let´s say you have an already created client on the database and next to the client you´ve a button to edit the client for example, so when you click on that edit button it goes to the edit client page with the client data on it as initial content so you can edit the information.
With this auto binding feature you bind the name of the client to the database field “nameofclient”. Then if a user modifies this field on the edit client page, it get´s automatically updated on the database without having to click on the “save” button?
I´m playing a little bit with this auto-binding new feature but I´m getting an error that I don´t have permission to modify it even though I´ve configured.
Just tested now and it works but it´s slower than the workflow right?
Also what if I want to bind it but not make any modifications till the user hits the “save” button on a page? I mean the binding will be great show the client information for example for editing but it won´t be modified in the database till the user hits the save button.
It’s actually faster, because there are less steps than a workflow. Why does it feel slower? In general, changes are reflected immediately anyway on the screen, so which lowliness are you talking about?
If you want to use save, just don’t use this new feature, and use the values of the inputs for display purposes.
For those who always create their bolean the wrong way, it’d be pretty cool to have the option to invert the value of the component when binding with the stored data.