Appending text to input box

I think I may be missing something obvious as new bubble user but…

Using a button, I want to copy text from textbox A and append it to multi line input B, without overwriting what is already in input B. A simple copy and paste feature.
Custom states appear only to allow overwriting of the whole input rather than appending.

1 Like

I need this too! How???

Can’t you just use something like “multiline input B’s value:append input A’s value” ? I do something almost identical in my app. I’ll double-check how I did it the next time I sit down at my computer and will share with you here.

I took a look and now I remember:

  1. Whenever you change multiline input B’s value, update a custom state called “Note” or whatever and make it of type text.

  2. Make multiline input B’s default value be the custom state’s value.

  3. When you press the button to copy over input A’s value, make it set the custom state to equal “multiline input B’s value:append input A’s value”.

  4. You might then need to reset the data of the group that multiline input B is in so that it will show the new value.

So, technically you’re right that we’re overwriting the whole value but this way we preserve what was there before the button press.

Extra bonus: Add a space before input A’s value when appending so that it’s not all jammed up against multiline input B’s original value.


thankyou, this worked nicely.

@BrianHenderson This worked perfectly! Any chance you know how to add a line break before appending the new text? (Sorry, noob here…)

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