I’m trying to hide a button based on whether a logged-in user has credits left. I know this can be done with a java script, but I’m unsure how to write it. Can someone help?
Here is what I’m trying to accomplish - in English"
If {loggedInUser.Free Promo Available} < 1, hide component_180.
That didn’t change anything. I got this to work. There seems to be an issue when using the {loggedInUser.XXX} and also the field value of <1. I changed it to look for the filed # and 0, which works.
Thank you for your help!
TB.render('component_182', function (data) {
fieldValue = data.record.field_1291;
if (fieldValue === 0) {
TB.hideComponent('component_180');
}
});