Multiline input- why doesn't this work?

I have a multiline input whose content gets modified when a user clicks a button. I’m trying to get the contents from the button click to update the MLI after the user starts typing. When that happens, the initial content changes and is no longer “empty”:

On the workflow side, I set the state:

When I try to click a button after typing, nothing happens. I’ve seen in other threads to not use a conditional and instead put the MLI’s state in the initial content of the Appearance tab. The problem I’m having is my initial content includes both static and dynamic text which you can’t do when you set a state (it has to be one or the other).

What should I do here?

Hi there, @sydney22… I’m not sure I completely understand your post, but if you are trying to take some text has been typed into a multiline input and add some text to it when a button is clicked so that the multiline input then displays the original text plus the added text, one way you can do it is as follows.

Set the Initial content (on the Appearance tab) of the multiline input to the custom state’s value. Then, when the button is clicked, set the custom state like this…

Finally, reset the input, and you should be good to go, assuming I haven’t missed the mark here by not understanding your post.

Hope this helps.


1 Like

Thanks, @mikeloc. I noticed some of your other posts on the subject of MLIs and tried to emulate prior to making my original post. The fundamental problem I have is many buttons (52) actioning the MLI in my setup. As such, my initial content is very complex with lots of static text and button states that change depending on which button the user selects.

Think of the buttons as substituting for merge tags at key points in the MLI. When a user starts typing, the button clicks no longer sub out text- the user must do it prior to typing.

I deliberately avoided setting the state on the initial content of the Appearance tab because I wouldn’t be able to include both static and dynamic text in the value input of the set state action (hope I’m being clear here- Bubble only allows you to do one or the other).

I’m chalking this up to a limitation of the multiline input. It isn’t an essential feature by any means but it’s something that I’d like to address eventually.

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