Any tricks to making this work: I'd like to dynami...
# suitescript
s
Any tricks to making this work: I'd like to dynamically hide/show a field on a form via a client script (e.g. field.isDisplay = true/false). However, the field I'd like to hide/show has been hidden by a user event script as part of the beforeLoad event (e.g. field.updateDisplayType({ displayType : serverWidget.FieldDisplayType.HIDDEN });). So far my only solution is to not hide the field in the user event script, and then hide it via the client script when the page loads (in pageInit). However, it looks pretty bad since the fields show up for a fraction of a second when you load the the page and then disappear.
b
You can try using an inline html field and ss1 to hide the field faster
Or use javascript to dom hack the field to add whatever the hidden field is missing so you can control it with client script
s
Thanks for the ideas!
j
@Seth Duda I've also seen that when a user event makes the field hidden you can't do anything to make it show up again in a client script. My approach in the past has been to have the user event make the field disabled instead
👍 1