Can free response text typed into an input form element be pulled into and kept in working memory?

Context: I am building a survey that is broken up into multiple small portions as to not overwhelm the person taking the survey. The survey is kept on one page and elements are hidden and displayed as you click through to the next portion of elements. As you click through, the choices are kept in working memory, nothing is recorded in a database until the very end when the user decides to submit their answers. This is intentional as I expect people to go back and forth between each portion, potentially changing their choices so I don’t want to involve the database until the end. So far I have been using repeating groups containing button elements that pull from a master option set that contains various answer types categorized by attributes. As the buttons are clicked, their display’s text value is added to the working memory, which is displayed to the user in a custom state so they can see the summary of their answer choices.

Question: Unfortunately the nature of the survey does require input form elements to gather free text responses. Can I pull the free text responses typed by the user into working memory/into the custom state that displays their responses? If so, how can I do this? I should note that there is intentionally no user login to access the survey for ease of access and privacy.

Thank you for you time!

Hello @blakemhampton Welcome to the community!

Consider using an RG of type texts. Have the source be empty and just add the texts as a list as they are “produced” by the inputs. You could think of this RG as a replacement for Bubble native custom states functionality. Name it “var texts” and it will show up on your expressions as such. You could even add conditions to it iof needed … so it becomes more versatile than a custom state. :wink:

Hi @cmarchan, thank you for your reply! I tried to do what you said but I’m having trouble setting up the workflow to display in a separate text box what the user enters into the input form. When I go to the workflow editor, I start with when the input box’s value is changed, an event should happen. I’m just not sure on the event itself. I figure it’s an element action but I can’t figure out how to configure it. I’ve included a photo to better show what I’m trying to do. Thank you again.

Hello @blakemhampton

I should have clarified that the rg suggestion was about keeping a list of texts that can be used when needed. You could place it in a hidden popup and even make it very small. It was not meant to be used in the UI that you are creating.

Oh I see, thank you anyways!

Blake, you may try the live text plug-in, it’s much better about taking real time values out of the inputs.

Each input would have a live text element. Then in your green text box you would just dynamically append all the live text elements values together.

Hey @arensbpa thanks so much for the recommendation. I’ve installed the plug in, placed it on the page with an input element to test it out. But how do I actually link the two? I set the Element ID of the Instant text element to be the input’s value, but nothing happens in preview. The plug in has mixed review mostly stemming from lack of included instructions on how to use it. Thanks so much for your time and insights! Blake

The ID you need to input in the instant text element is not the “name of the input element”, it’s the ID attribute of the input element. Open the appearance tab on your element and scroll all the way to the bottom. If you don’t see a “ID attribute field” then you’ll need to enable ID attribute in your bubble general settings. (I’m going off memory here so exact wording may be different).

Set the ID attribute of the input element to ex: input-1 and copy and paste it into ID field in the live text element.

Now you just need to extract the live text elements value - for test purposes just add another visible text element on your page and set it to “live text As value” and preview your page. When you type in the input that you’ve connected to the live text element you’ll see your text element replicate the text in the input. Does that work for you?

@arensbpa Thank you so much! Works beautifully and interestingly much faster display of the input text as opposed to just setting the text box element’s value to the input element’s value. There’s a bit of a delay with the latter set up.

You’ve already helped me more than I could have asked but I am curious about something. If I try to put an input element into a repeating group, the input element disappears on the preview page. Do you happen to know why this happens? I have repeating groups pulling in prompts from option sets, and it would be nice to put the input element right next to the prompt in the repeating group cell. I’m guessing the reason for this is if you change the value of the input form in one cell, it would change in all of the cells? Granted I could just place the the input element next to each cell to make the prompt cell and input element appear paired to the user.

Repeating groups are used to display lists of data. If you set the repeating groups type as “XYZ option set” and then set the data source to “all options”, you are pulling the entire list into the repeating group. The beauty of a repeating group is that each row will display one of the items in that list - hence why you see “current cells XYZ option”. Not sure why you’re not seeing the input. Recommend you go on youtube and learn more about how to use repeating groups :+1: good luck

1 Like

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