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

**URL:** <https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739>\
**Category:** Questions\
**Created:** [April 1, 2023, 7:13am UTC](https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739 "2023-04-01T07:13:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alain.gicquaire](https://avatars.discourse-cdn.com/v4/letter/a/9f8e36/32.png) [@alain.gicquaire](https://forum.bubble.io/u/alain.gicquaire)\
**Post date:** [April 1, 2023, 7:13am UTC](https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739/1 "2023-04-01T07:13:12Z")

</div>

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 !!!

---

<div class="post-metadata">

**Author:** ![salemmo409](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/salemmo409/32/202575_2.png) [@salemmo409](https://forum.bubble.io/u/salemmo409)\
**Post date:** [April 1, 2023, 7:53am UTC](https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739/2 "2023-04-01T07:53:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kazimdgoni](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kazimdgoni/32/148445_2.png) [@kazimdgoni](https://forum.bubble.io/u/kazimdgoni)\
**Post date:** [April 1, 2023, 9:50am UTC](https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739/3 "2023-04-01T09:50:18Z")

</div>

Hi @alain.gicquaire welcome to the community.

> [@alain.gicquaire](#):
>
> How can I do to use the same page contact\_form to modify or create contact

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](https://us1.discourse-cdn.com/bubble/original/3X/c/e/ce77d7e6f37f6ca75f309ae9257196adf86680de.png)  
“Create form” group can be visible by default. Please tick the box “Collapse when hidden”  
 ![Screenshot_125](https://us1.discourse-cdn.com/bubble/original/3X/0/8/082331b746ec6adc976303e5260ce5b060403d08.png)

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](https://us1.discourse-cdn.com/bubble/original/3X/d/d/ddb082312776f2593409c1f4f1195d1941e0c893.png)

“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.

 ![Screenshot_129](https://us1.discourse-cdn.com/bubble/original/3X/6/5/65d62f57c7895098ed8dce7bfc7e903f23bc0ece.png)

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

![Screenshot_127](https://us1.discourse-cdn.com/bubble/original/3X/a/0/a0c5a07920016c953f402ede27d493e211cae839.png)

\*\* 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.

 ![Screenshot_130](https://us1.discourse-cdn.com/bubble/original/3X/8/c/8cb49df177d03169ade065116c886bfa61bad4dc.png)

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

 ![Screenshot_131](https://us1.discourse-cdn.com/bubble/original/3X/a/9/a99f588ee3b557ba556fa93dc8bc7e4d6938465c.png)

**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.

 ![Screenshot_128](https://us1.discourse-cdn.com/bubble/original/3X/0/3/03ee95942511b6338b15061fcd1476462dbef609.png)

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

 ![Screenshot_132](https://us1.discourse-cdn.com/bubble/original/3X/5/a/5ab44569d87d85535323cb2b3e9aefb0231efdf1.png)

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 🙂

---

<div class="post-metadata">

**Author:** ![alain.gicquaire](https://avatars.discourse-cdn.com/v4/letter/a/9f8e36/32.png) [@alain.gicquaire](https://forum.bubble.io/u/alain.gicquaire)\
**Post date:** [April 2, 2023, 4:32pm UTC](https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739/4 "2023-04-02T16:32:31Z")

</div>

> [@salemmo409](#):
>
> 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.

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 ?

---

<div class="post-metadata">

**Author:** ![alain.gicquaire](https://avatars.discourse-cdn.com/v4/letter/a/9f8e36/32.png) [@alain.gicquaire](https://forum.bubble.io/u/alain.gicquaire)\
**Post date:** [April 2, 2023, 4:59pm UTC](https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739/5 "2023-04-02T16:59:27Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![kazimdgoni](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kazimdgoni/32/148445_2.png) [@kazimdgoni](https://forum.bubble.io/u/kazimdgoni)\
**Post date:** [April 2, 2023, 6:41pm UTC](https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739/6 "2023-04-02T18:41:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alain.gicquaire](https://avatars.discourse-cdn.com/v4/letter/a/9f8e36/32.png) [@alain.gicquaire](https://forum.bubble.io/u/alain.gicquaire)\
**Post date:** [April 4, 2023, 12:52pm UTC](https://forum.bubble.io/t/same-page-form-to-modify-a-record-or-create-a-new-one/254739/7 "2023-04-04T12:52:10Z")

</div>

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