Transcript
In this Quick Tip, we’re going to learn about autobinding.
Autobinding lets us modify a value automatically to a data type, without using a workflow.
Here on this page, we're logged in and we have a group to display this user's information. If we wanted to fill out the name for this user, we would typically use an input and button to start a workflow around this input to modify the user. That would look something like this.
But if we didn’t want to run a workflow and update things automatically, we can autobind this input directly to the custom field on the user type. First, we'll delete our button and workflow and take a look at our group that has a Type of content and Data source set. For this example, we're autobinding to the user, but this can be any data type you like.
We'll open the input's property editor, and click on Enable auto binding on parent element's thing. Since the parent element has Type of content set to user, we have access to the users' custom fields that we can autobind too, which we'll then pick Name.
Now we told this input to modify this field on the user data type, and since our Data source is the Current user that’s who it will autobind to.
Finally to successfully autobind, we need to make sure that the user data type has some privacy rules associated to it, so our data is secure. When working with autobinding and privacy rules, make sure that your permissions are correct and the field that you want to Allow auto-binding to is checked.
For more information on privacy rules, you can check out our tutorial in the description below.
Now with that set, when we type in our name, it will automatically autobind it to the current user which we can double check in our App Data.
Autobinding saves you time so you don’t need to worry about initial content for the input or have a workflow trigger when a value changes.
That’s it for this Quick Tip! For more, be sure to check bubble.io/academy.