Change input text after successful api response

What is the best way of handling form changes based on api response? I am having a newsletter form with an input for email and a button. I want to change the text of the input field and disable the input, when they successful subscribed to my newsletter. How can I achieve it?
Thanks for your help!

Do you need it to be specifically upon a response from the API? You could do it when the button is clicked or when the form is submitted (Server Connect Success). I assume it’s to stop duplicate submissions?

Server connect success would be fine, but I didnt find any tutorial, doc or option wappler to achieve it. Can you point me to the right solution? Thanks for the help!

just add a success event under dynamic events

2 Likes

Thanks, but how to actually change the text of the input field? What kind of action can I use for it?

set a variable call it varSubscribed and set value to 0

On the area where you want to change the text set up two and then use the dynamic attribute for show. So then change which span is shown when the value of the variable changes. When you have a success event on your form then also set the variable value to 1.

Initial Message
already subscribed message

Thanks for the answer!