Sending data from dropdowns

Hi all,

Trying to get static data (I may make this dynamic in the future) to be sent from a dropdown on one page to input in the next page.

I can’t seem to do that with the submit button (screenshotted) with data as ‘uncompatible type’.

Please advise,

Alex

Hi Alex,

You want to send data via URL parameters. Select the checkbox right below the “Data to Send” area you’re in in the screenshot. Type in a key for your parameter and set the dropdown value to the value of the parameter. This will put it in the URL on the next page:

e.g. app.com/sell_equity_form?dropdown=selectionA

Where “dropdown” is the key and “selectionA” is the value of the dropdown.

Then, on the other page, you can extract the value by using “Get data from page URL” - you’ll define the key again so that it knows which value to extract (because it’s possible to send multiple parameters)

1 Like

Hey,

Sorry - only saw a notification for this now!
Okay - can I still send the User data over as well as that?
(as I now am sending URL parameter instead of user data)

Alex

Yes, you can send multiple URL parameters when you navigate to a page. Just keep clicking “Add another parameter” in the Go to Page action. Multiple URLs will be separated by a “&”.

Eg.

app.com/sell_equity_form?dropdown=selectionA&user=john@example.com

Tip: If you send the user’s unique ID as the value of the user parameter, then when you extract it using “Get data from page URL”, you can tell Bubble that the parameter is a User (and not a text), which will allow you to pull the entire user record instead of just an email or some other text field.

2 Likes

great thanks!

Hi @romanmg
How would I do this if I was sending the data from one popup to another popup? A user would be adding data in one popup and I want to then to see it in the next popup that opens. The workflow has the next popup showing but I can not figure out how to send the data that has just been saved from that popup

Thanks

@motorhome are you trying to build a wizard-like flow to walk user through a sequential set of steps on the same page? If so, I’d suggest using groups that are shown/hidden based on a custom state (eg add a custom state to the page element, state = “wizard”, type=number) rather than a series of multiple popups.

Think of each Group as a “screen”, and set them all hidden by default. Then, to show step 1, set the first “screen’s” (group’s) condition to “When page’s wizard=1–>this element is visible”. You can use an arrow icon to “advance” to next screen by creating a workflow so that when arrow is clicked–>set page’s wizard to page’s wizard + 1.

Since this is all happening on same page, you don’t have to pass data back and forth to elements. Provided the user inputs on screen 1 are saved to the db, you can just reference them from the db on screen 2.

Hi @motorhome,

A few thoughts:

  1. If popup one is saving things to the database, you can simply reference that database value in popup two like @djwideman suggested. (I do prefer hidden groups over a bunch of popups as well for better UX, but that part is up to you because you’ll need to employ the same method for retrieving data either way).

  2. If popup one is creating and/or making changes to one specific database record to be referenced for the rest of the steps, do this: Set the Type of all the subsequent popups to the Thing involved and then when you show each popup, display data in each one and set the data as the result of the current step. For example:

  • Set Popup 2’s Content Type to “Product”
  • Button Save is clicked in Popup 1: Create a New Product > Hide Popup 1 > Show Popup 2 > Display Data (Element: Popup 2, Data: Result of Step 1)
  • Now you can have a text element in Popup 2 that says something like “Fill in the details for Parent Group’s Product’s Name
  1. If you’re not saving anything to the database yet, you need to use custom states.I’d create the state on the page itself for this (open the property editor for the page and click on the “i” icon to add a new state). The action you want to update custom state values is Set State. So you’d continue displaying the value of the custom state until you’re ready to save that value to the database.

Hope this helps!

Thanks so much @romanmg and @djwideman. I love the idea of the groups rather than the popup. So much better. The popups came about at the very start of building my complex app when I have never done anything like this before. Learning so much from you all on this forum and loving it. I agree hidden groups makes a better option from a UX point of view

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.