Bubble.io Beginners - How to create a new database entry
In this Bubble tutorial for beginners we explain how you can create new entries in your Bubble database using a form. We use the Create new thing workflow action to create a new contact using 2 input fields.
Save data like a pro: Learn how to create new database entries in Bubble without breaking a sweat!
Master form submissions: Discover the secret to linking your input fields directly to your database fields.
Streamline your app flow: Unlock the power of the Go to Page action to enhance user experience after form submission.
Creating a New Contact in Bubble.io
In this Bubble tutorial video, I'm going to show you one way that you can save data to your database from your design. We've got a form here and this is going to create a contact and if I show you my data tab, I've already got a data type called contacts. So how do I save name and email address and create a new contact?
Introduction to Planet No Code
But before I launch into that, if you're new to Bubble or even if you've been using Bubble for months, we are Planet No Code and we've got a website, planetnodecode.com where you can find Bubble tutorial videos that you cannot find on YouTube. We've got amazing tutorials exclusive to our members only available at planetnodecode.com.
Creating a Workflow to Save Data
Let's get back to this. How do we save it? So we have a button and we have two fields and I'm going to add a workflow to the button. So I click on the button and I click add workflow and that takes me into the workflow tab and it sets up a workflow for when button create is clicked. I can now do a series of actions and the action that I want to take is data create a new thing and then I choose from my data types that I've already got and this time I'm choosing contacts.
Linking Form Inputs to Database Fields
And then I find the field. So I have name and I have email and now I need to link my form, my inputs in the design tab to the fields here saying that name equals and so I find my input name. And it's value and I find my input email address and it's value.
Testing the Workflow
Let's preview that. So let's put in a name and we'll put in an email address. And I click create and hopefully if we go into data. We'll see that a new record has been created for Tony with email address Tony at Stark.com.
Conclusion and Next Steps
So that's how you do it. That's a really simple way of saving data to your database. A next step would be most people if you are taking your user to a form and you want them filling that in and then you want to take them back you would add in a go to page. And say taken back to your index page or your dashboard page so that when they've completed the form as you saw when I just did it you're stuck. You want to change that you want to move them on to your next page keep the flow going in your app.
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
3 ways we support solopreneurs
Our team is here to help, with a combined 30+ years working for internet startips.
Learn Bubble
Explore our library of 300+ Bubble and no code tutorial videos. Watched by over 800k no coders on YouTube.
Bubble Coaching
Troubleshoot your Bubble app and build new no code features with our in house Bubble expert.
Mastery
Ready to take your SaaS idea to the next level? Join our exclusive Mastery program for personalised content & mentoring.