Skip to main content
← Data, API & Backend
Data, API & Backend January 27, 2023 · 4 replies

One form on two screens

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

Hi guys, 

I got a question on data sharing between two screens. I am building a Sign Up functionality : 

  • the first screen has 3 fields (name, password, email) 
  • the second screen has 3 fields (address, city, postal code).

On my first screen, I got a button to navigate to the second one to finish signing up. On the second screen, I got a button and an on click event triggering a call to my API to create a user.

On submit, name, password and email are empty/undefined. Is there a way to build a form with inputs shared on two screens ? 

Thanks !

4 replies

Robin January 27, 2023

Hi Adrien, 
Here is the way I do it, as it seems to be the only solution now :

  • On the sign-up screen, you ask for the first 3 fields
  • You create two main components within your homepage :
    • The first one is going to be a form with thos 3 fields -> on success = "refresh"
    • The second one is going to be the real homepage
  • Then you create a visibility logic in which, "IF USER's adress,  USER's city, and  USER's postal code is empty THEN response.visibleForm=YES and visible.homePage=NO". 
  • you create the oposite logic 
  • You bind the visibility to the components

 

It's not the best, but as Bravo doesn't allow us to pass data between pages, we have no option for now...
Just so you know, this fonctionnality is within bravo studio's roadmap (and the one I'm the most excited about).

(DM's open if needed)

Alex January 27, 2023

I like that solution. I believe there might also a solution where the second screen is a "pop up", sometimes Bravo interprets pop-ups as one screen so it might not break the form.

Alex January 27, 2023

Separately it could be a nice Feature Request to allow bravo to use 'anchor points' like a webpage. That way you could create a very long form and jump to different sections via a "next button" and then only have one final "submit button"

Adrien January 27, 2023

Thanks a lot for your answers   and  , I will try your solutions ! :) I will let know what I choose.

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord