How to change the elements of html page based on response, in LV?

Let’s say, I want to click a LV button, and once response arrives, make a button disabled. Does LV allow this, and if so, how?

Or if I want to add or remove a text. For instance, I click a button “disable user”, user gets disabled on backend, and then I want to display the static text “user disabled” in place of a button.

Another variant: after clicking a button and getting a response from backend, I want to make a button itself disabled, with a text on it changed.

All of this without reloading a page.

Does LV alone allow all of this? Or will javascript have to be used here?

1 Like

Sure, the trick is to set the text or the disabled state from an assign, and then change that assign in LiveView.

If you show some example HTML you’re trying to add this functionality to we can suggest more in detail.

1 Like