Hiding a field and caption can normally be done by setting the display property of the control to none.
Example:
crmForm.all.new_customfield.style.display = "none";
crmForm.all.new_customfield_c.style.display = "none";
The _c extensions specifies the caption of the field.
In case of a lookupfield the above code won't work bacause the "new_customfield" points to the lookup button and not the textbox.
Another way to hide fields and captions it to hide the TD tag that is wrapped arround it. This will work for all types of fields.
Example:
crmForm.all.new_customfield_d.style.display = "none";
crmForm.all.new_customfield_c.style.display = "none";
_d meaning the data field (the textbox) and _c meaning caption.
Enjoy!!
Can you “force” VSCode extensions on your team’s PC’s?
4 jaar geleden
Geen opmerkingen:
Een reactie posten