Forum Documentation Showcase Pricing Learn more

Edit data shown in repeating group

Hello

I’m trying to build a page that shows the results from a database and allows us to update the database.

What we are trying to accomplish is have the repeating group show all the data from a database and let the user edit one file so we can see the progress on the individual database item.

How do we do this?

1 Like

You would create another group or poupup, with input elements of those data you want to edit.

Make sure the popups source type is of the same type of the repeating group,

Then set each input element’s initial data to parents thing’s email for example.

Then add an icon on the repeating group with a workflow that will show this popup and “display current cells thing”.

On the popup add a save button with a workflow to “make changes to thing” to parents thing.

Another action that will hide the popup.

Its also good to add a cancel button with a workflow to hide without saving.

1 Like

Thank you for helping with this. I got most of this working, but I can’t seem to get the dropdown to show all the options from the form that I created on another page.

Can you help with that?

Here is the app

are those static options, or dynamic? in other words those options are listed somewhere in the database or is something you have only available when filling the for?

If its dynamic, you would have to choose in the dropdown properties the source of the options, do search for

if its static, bubble has no way to know what you want to show in the dropdown unless you list it there in the properties as static choices

Okay…yes they are static right now. I will make them dynamic.

I got the same problem too, if you have done your project so please share it here.

An easier way to accomplish this, if I understand your usage correctly, would be with a custom state.

For example: You have a repeating group with fields you would like the user to be able to edit, such as a customer’s data.

And we want to be able to edit customer data, and then save it.

What we’ll do is construct our repeating group with the appropriate fields for our data type. We’re going to use INPUT fields, rather than TEXT elements.

Then, we’ll style the inputs so that they look like text elements. In the element’s settings, we’ll also set these input fields to “This Input is Disabled” by default.

Next, we’re going to create a custom state and call it “Edit Mode”, which will be a “Yes/No” Value. Yes being editable, no being not editable. It doesn’t matter which element you set the custom state on, but setting it on the repeating group is probably the easiest.

Now, we’re going to set some conditions on the various elements, so that they will change depending on the “Edit Mode”.

Set the conditions of the Input elements to "When [repeating group’s] “Edit Mode” is Yes, and the “Property to Change” will be “This input is disabled”. Set that to no, so that it will be active for editing. For a little extra styling, you can also change the background color of the element to make it a little more noticeable by the user. Set an alternate state for when “Edit Mode” is no, and make the input disabled.

You can do the same with the “Edit” button you made, so that it becomes a “Save” button when in edit mode.

Now, in your workflows, you will create two separate flows for each state. One for what happens when it’s yes, the other for no.

edit06

So, when the button is clicked, and the repeating groups edit mode is “yes”, we will “make changes to a thing” which is the current cells customer, and change the fields to the value of the input elements.

The alternate will be when the button is clicked, and the repeating groups edit mode is “no” we will set the state of the repeating group to “yes”. So, when edit mode is “No” set state to “Yes”. This enables all the conditions to make the fields editable.

This way, the user will be able to edit all data in-line, without creating separate groups.

6 Likes

thanks for your help but when i press save , it gets saved in the database , but the button dosent turn back to its deafult which is edit