I have a form object and I need to check if the value of a field is equal a certain string
I’m trying this but it is not working
@if(sp.pageType.equals("customreCare")) {
//render this specific div
} else {
//render this other div
}
but unfortunately it is not working, what is the syntax for that?
Use
==operator for comparing strings:so in your case (of course make sure that there are no typos in the conditions like
customreCare…):