I wonder if anyone can give me a pointer with some preliminary population in the JSP:
So, I am trying to pre-populate a checkbox depending on the value in the client database record. The checkbox will be checked if there is 1 in the field, another option will be 0, where the checkbox should be empty.
I am currently using this code for input:
<%if (UPDATEDPREFERENCES != null) { if (ISNEWSLETTER != "0") { out.println("checked"); } } %>
so it will be:
<input type='checkbox' class="newsletter" name='temp_ISNEWSLETTER_FIELD' id="temp_ISNEWSLETTER_FIELD" <%if (UPDATEDPREFERENCES != null) { if (ISNEWSLETTER != "0") { out.println("checked"); } } %>/>
In its current form, it pre-fills everything. However, it is also populated if the field is 0. If I changed it, read:
if (ISNEWSLETTER == "1")
then the checkbox is empty, be it 1 or 0.
Am I missing something obvious? I am not a developer, I am in New York, and my support is in Belgium - they all went away for a day.
source share