I didn’t notice if you tried this but you can use the Reset Variable Values. This example is from the Ticketing App template. Though this shows the reset in the On submit workflow, you do this in a button too.
Another idea is to ask AI to add a button that clears the form values and see what it generates.
Hi Fred,
good job with the video. A visual demonstration always helps to understand the problem much faster.
-
I assume that “reset form” just can’t change anything inside a component (the green “Message” element in your elements tree). That’s why it doesn’t work.
-
The second approach with JS code generated by AI is untenable. Because the “Variable *” option is empty, so the code doesn’t do any changes to any variable.
-
The third approach is similar to the first one. “Form container - form” just can’t affect data inside your “Message” component.
To make the “clear” button work you need to change the data inside the “Message” component. And for that you need to reset/change the variable containing your text example inside the message box.
I’d create a workflow inside the “Message” component to clear that variable. And then just call that workflow outside of the component - from the “Send message” workflow you demonstrated in the video.
Hope it helps.
I did ask Weweb AI, and it added a step that didn’t work.
I don’t know how to add a workflow inside a component. I didn’t create this component (I think I got it from the starter kit library). Is it even possible to edit someone else’s component that you downloaded?
OK, so I successfully edited the Message component by adding 2 workflows: Reset message field Resets the variable value message_variable. Set message to ““ changes the message_value to ““. I set both of these workflows to Allow execution from outside. I’ve added an Execute component action step in my main workflow. I’ve tried executing both of my component workflows, and neither of them works. Any suggestions?
hard to tell without seeing your setup.
I’ve tested it on my side. Works well:
I guess you didn’t bind text variable to your input “initial value”.
thanks for your help. It turns out it was working, but I was targeting the wrong variable!
