Find & replace for input

Hello bubblers,

I’m trying to use the find & replace directly on a input. In my example below,

I have an input and a button, when I click on the button, I set a state of a group to be the input’s value where every “a” is replaced by an “x”. On the input, I have a conditional where everytime the state of the group is not empty, find the value of the input and replace it with the group’s state.

Everything seems to work except the last part. The value in the input isn’t replaced by the group’s state.

I don’t know what I’m getting wrong.

Here’s my example
And here’s the editor

Hi there, @fbnc.vntrs… if I understand your post correctly, try setting the input’s Initial content field to the custom state’s value, and see if that produces the desired result. I know you are doing that in the conditional, but I mean the Initial content field on the input’s Appearance tab.

Best…
Mike

1 Like

Yes exactly, I want to replace the content of the input or part of it by the state’s value

Ah, okay… add another step to your workflow that resets the group’s data, and you should be good to go. Oh, and I would still get rid of the conditional and set the input’s initial content to the custom state’s value.

I tried to do this, so the content of the input is cleared but it’s not replaced by the state’s value. I also get this error in the log:

You don’t have the initial content linked to the custom state. Instead, you are doing the find and replace in the initial content field… so, remove that expression and set the initial content to Group A's tag active.

1 Like

Thank you :pray:

1 Like

By any chance, do you know how I could remove part of the input by clicking on the button? I mean, let’s say I have “this content” on the input, and i want by clicking on the button, to remove “this” ?

Find “this” and replace with nothing?

How is this possible through workflow?

You are already doing the find and replace in a workflow… so, you would do it the same way. Is that what you mean?

I was trying to add content from a repeating group this time replacing what is in the input, I found the solution. Thank you!

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