Thymeleaf hide button

Asked

Viewed 108 times

0

I have a single modal which I call in two pages. I want the button ALTERAR CLIENTE appears in the modal of page "A" and on page "B" this button disappears. Like I said it’s the same modal for two different pages and would like to hide the button only on one of the pages.

inserir a descrição da imagem aqui

1 answer

0

Good afternoon, you can put a Boolean flag in the controller that takes users to these pages and use the th:if whether or not to display the button. For example:

<button th:if="${podeAlterarCliente} type="button" class="btn btn-secondary">Alterar Cliente</button>

I hope I’ve helped!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.