Same page, form to modify a record or create a new one?

Hi the team !!
I have 2 pages contacts_list and contact_form in contact _list I display in a repeating group the liste of contacts And when I click on a cell I open contact_form to modify the contact.
When I want to add a new contact I have the button “Add” in contacts_list and I go to the page contact_form and create the new contact.

Question How can I do to use the same page contact_form to modify or create contact ?

Hope my question is clear.

Thank you all for your answers !!!

You may send the cell’s caontact using data to send in the go to page action (bubble’s refference have a good informatin about this), but if I built something similar, I would put the form and the list on one page, because there is no need for two pages for that.

Hi @alain.gicquaire welcome to the community.

You can use the conditionals to make the visibility of any element by creating conditions on the conditional tab of the element.

You can create two groups (edit form, create form).
Screenshot_124
“Create form” group can be visible by default. Please tick the box “Collapse when hidden”
Screenshot_125

In the conditional table of the “Create Form” group create the condition when “Edit Form” group is visible this element (create form) is not visible.

Screenshot_126

“Edit Form” group will be visible based on the “URL Parameters” like when edit contact button/icon is clicked in the repeating group of the contact list you send the parameter current cell’s contact list’s unique id to the contact form page/same page.

You can say when url parameter (uid in this case) is not empty this element, “Edit Form” group is visible.

Screenshot_127

** You can send the user to a different page or to the same page, but you can send the parameter for both cases.

Inputs value for the “Edit Form” will be set from the Url parameters as well.

So then when edit contact is clicked you make the changes in the database.

Solution2: To edit the contact without going to another page or sending the parameters in the URL - AUTOBINDING

Since repeating group data type is contact list you can use Input element instead of text element inside the repeating group, to show the contact lists. You can design them like text element. But this will give you an advantage of Autobinding and faster user experience for the user.

You can create an alert message to show the uses that changes has been made by ticking the box “Show alert on success”

You will need to set up a privacy rule which is pretty simple to use. Allowing users to auto-binding

Solution3: Pop Up - You can use Pop up when edit button/icon is clicked in the repeating group. You will need to follow the same process of sending the current cells contacts unique id to URL. Then you use the “Edit Form” group element inside the popup. Rest of the steps are same as mentioned above.

Hope it helps. Happy building :slightly_smiling_face:

Thank you for your advice.
Id did this because my second page is very big and more complicated than the first one.
Do you still think I should yuse only one page ?

Your answer is so detailed, thank you very much !!!

Do you know if I can send an option set in the URL ?

1 Like

Can you please share more details, what are trying to achieve and how everything is set up?

Hi, I ll come back later about this subject.
Thank you again.