In 2.0, anyone added fields via UE and then tried ...
# suitescript
c
In 2.0, anyone added fields via UE and then tried to show/hide them via client script? If i set to hidden when adding during the UE i can never bring them back with the CL. If I just hide the fields on pageInit, everything works great but you initially see all the fields and then they disappear. What i'd like is to leave them hidden via the UE and be able to bring them back... doesn't seem to work using isDisplay or even isVisible in the client script
m
I think when you hide fields in a UE (or on form setup for non-scripted fields), they're loaded in a separate, hidden
<div>
(or something to that effect), so the client methods won't work in that instance (and even if they would, the fields wouldn't be in the correct location on the form). I know it's not the same UX, but I usually disable in a UE and enable/disable in CL instead of hiding/showing for that reason.
b
netsuite is weird with their hidden fields
if it starts out hidden, its missing html that suitescript uses to find the field, so you can't use suitescript to unhide it
c
thats what i figured. Its in some weird html block when i inspected it. Im doing a UI for 2 ladies working in an office so trying to make it super simple.. Hiding the fields gives them only what they need so i'll probably just stick with the hiding in pageInit
thank you
e
Put them in a div with a class that makes everything the color of the background (white) so technically they are still visible and then on the client script you can remove the class to change them to “normal” colors?
c
Thats a bit much for what i wanna do. Just was trying to not show like 20 fields and then they "poof". There's no real issue other than trying to see if I was just being dumb in my approach.