I’m VERY new to bubble and need some help. I’m trying keep data placed in the input fields when I navigate from page to page (specifically the last and first name input fields). I currently have 2 pages that I’m working with the index page and the additional info patient page.
Keeping the data from page to page works fine with the auto-binding feature, however, when I’m ready to reset the page or clear the input fields, the fields do not reset and the data remains (when clicking the continue or go back buttons). I have to manually delete each field which becomes cumbersome. I want to be able to clear the page with the click of my reset button like the other fields work.
I have the entire page grouped so that it would be easy to reset the input fields when needed. Is there a simple logic that you all can suggest?
I’ve also tried as a dynamic field with the current user but the data in the input fields do not remain. Any suggestions? I’ve gone through several tutorials and still no luck. Please note: I am not trying to store data permanently at this time. (I know how to do that.) Just want to hae the data stay on the page until I reset or clear the input fields.
EDIT: I didn’t read the last part. I will add another comment on how to store the data. It’s fairly simple for what you are doing.
So, if I have read this correct, when you are clearing the page, you want to basically delete the data that is on the page in whole.
The best way to do this (in my opinion) would be to set up a workflow for your clear button that delete’s the data in the database, only if the data in the database matches the data on the page.
Here’s an example of what I’m talking about:
Now obviously for your app, you would replace your button with the button you are using. And database with the data set that you are trying to clear from.
Hope this helps!
Here is how to save the data (if you are trying to save it until it’s manually deleted.)
First, you will start/edit workflow on the button that you would like to use to save the data. Then you will create a function that under the data tab, will add something to the database.
Afterwards, you can just basically re-create what I have created below. If you would like to add any other fields to the database, just select “Add Another Field” and create the field you want to use.
Hope this helps as well!
If you need to look on the platform it’s self. Here is the editor link to view the app: https://bubble.io/page?name=index&id=delete-data-on-page-test&tab=tabs-2
I would add all the inputs into a group - you want your source to be patient not the current user. So you specify the patient - from a list and that loads the data for that patient into the group. You can still use auto-bind with this approach.
Hope that makes sense.
Thanks for responding. All input fields are currently in a group called “entire page”. The my reset button works fine for all non auto-bind input fields. My problem is how can I get the auto-bind input fields to clear when clicking my reset button. Can this only be achieved by creating patients in a list? Or is there another way to make the input fields data entry that the user enters remain in place even if they navigate to other pages within the application, without using auto-bind? I just want it to remain on the page until they click the reset button. Currently, when a user navigates to another page and comes back to the index page, the data that is not “auto-bind” is automatically cleared. I currently don’t want to have to store or create data. Sorry if I’m not catching on.
Thank you for responding! I do know how to create databases, however your approach is MUCH cleaner then want I had previously done. I will surely adopt your logic when needed to store data!
If I can avoid having to create or store actual data; this would be my ultimate goal. The my reset button works fine for all non auto-bind input fields. My problem is how can I get the auto-bind input fields to clear when clicking my reset button. Can this only be achieved by creating databases? Or is there another way to make the input fields data entry that the user enters remain in place even if they navigate to other pages within the application, without using auto-bind? Currently, when a user navigates to another page and comes back to the index page, the data that is not “auto-bind” is automatically cleared. I just want it to remain on the page until they click the reset button. Sorry if I’m not catching on.
As far as I know. The only way to achieve that is to create and store the data in a database. Also, creating a database is fairly simple! All you have to do is navigate to the “Data” tab on your app’s editor, where it says “New Type” you will type in the data that is going to be stored. For example. If it were user’s being created (Which bubble has a database for in all apps by default), I would create a new data type called “User”. Which in your case, according to your initial post, you are trying to create patients. So you would create a new data type called “Patient” and add all of the fields that a user would fill out to that data type. Then, once the action is called to create a patient, it would use the data from the inputs to create the patient, similar to what I previously commented about creating databases.
Hope this helps!
Hi again Simon,
Would you showing me the logic behind your initial response?
I knocked you up an quick example app that should show you what I mean
Thanks Simon. This is VERY helpful and would give me what I want. I could allow the user to easily add patients and review them again and edit it I choose, which is a plus! Is there any way you can give me access to the workflow behind this?
I want to make sure that I link my buttons correctly. And also, does this still cause for me to build a “database” of some sort? If so, I would I create it. The tutorials that I viewed seem very elaborate for what I want. Or am I thinking about it too small??? If I can get past this, I will be good! LOL!
Simon you are AWESOME! But for whatever reason my input auto-bind fields still won’t reset. The drop-down records the specific data, however it doesn’t re-populate the input fields when selected like your example… I’m starting to think it’s because I’m using the “hobby” version, maybe?
Did you spot in the workflow the passing of the Display Data, this passes the record for the Patient from the dropdown to the group
I copied your exact workflow plus adding the save button. the page now resets, however, the dropdown button isn’t displaying previous entries. Can you take a look at it and tell me what you see wrong?
I finally got the application to work per your suggestions! THANK YOU SOOOOO MUCH! I had to recreate the application from scratch and everything works. You’ve been a great help to me! Thank you for being so patient with me!
My pleasure - can you mark your post as solved
Good luck and happy learning
This topic was automatically closed after 70 days. New replies are no longer allowed.