Hi Experts, I need a quick help. Urgent! I have cr...
# suitescript
u
Hi Experts, I need a quick help. Urgent! I have created the online customer form in NetSuite and changed multiselect dropdown to checkboxes. All is working fine but there is an extra checkbox showing (image attached). Please help me to remove it. I'm also attaching html file.
b
not really suitescript
the code is ugly and mysterious enough that ill give a high level guess
the code works by making copies of an existing checkbox
my guess is that the extra checkbox is the original checkbox that was not removed
u
Can I hide this checkbox?
b
You should probably inspect the checkbox to see if my guess is correct
If it is, then hide or remove it
u
Not done using inspect. Is there any other way to do it or this can be fixed?
j
I don't even see the checkboxes in your code or any elements that would reference the image
u
Check Line 311 - 332
j
I see... I didn't click see it in full
b
inspecting elements is a function of your browser's developer tools
honestly essential for html work
j
must be something in your checkbox grid, he is right with inspecting the elements in the browser
there's got to be a better way to architect this, very hard to read and understand what's going on
u
I was following this answer for multiselect to checkboxes. Please suggest me a better solution if any. https://stackoverflow.com/questions/38954762/how-to-change-a-field-type-in-netsuite
j
try fixing errors in the CSS as well
line 66-73, delete that if possible
line 110 - remove : before the #95C044
line 94 is being ignored due to another css element already declared
u
I guess this is little confusing as I'm getting different values in these lines. Can you modify and share updated file if possible..
b
i personally think the code is a lost cause once you no longer know what it does, or why it does it that way
j
No errors in CSS
u
Actually this is the code of one of our previous team member. I was trying to update it for checkboxes requirement and apply it to different form. All is working well expect multiselect checkboxes.
b
same idea, if the one maintaining it doesnt understand it, the code is a liability
u
still getting extra checkbox.
b
the basic idea expressed in the stack over flow answer is sane
If you use a custom template you can hide the drop-down and iterate its options to create your own checkboxes.
hide the dropdown, make a selector to get the select options
then add a checkbox for each select option
the code that was shared does a lot of stuff that falls outside of those guidelines
one of which appears to be making copies of checkboxes instead of making new ones
i personally have no idea why it works that way, and im actually guessing that copying process is what is causing your issue
a general troubleshooting process would be to inspect the extra checkbox to see what properties it has
in this case, to see if it matches the checkbox that is originally on the form and is being copied for the other checkboxes
if it is, the simple fix is to remove or hide that original checkbox
u
Okay. Thanks for the help let me try to hide the original checkbox.
n
I had this issue from a template I just have picked up. The “second” box is a shadow that was in the CSS.