Hide Button on Dynamic Page When Field Is Empty

Hello,

I have been trying to do this same thing. I have been trying for weeks to get it to work, searching up and down the internet. I FINALLY GOT IT TO WORK!! Some Background: What I am doing is I have a job application form on our website that is write only, so someone can fill it out and apply. They can also upload their resume. THEN, I duplicated the entire form on a separate page and made it read only, so our HR department could read through applications on our site, instead of through the backend spreadsheet view.

what I was trying to do is make the “View Uploaded Resume” button disappear if they didn’t upload a resume. I have tested this code 6 ways to sunday on almost every browser and it works every time!

My dynamic dataset for this example is called “dynamicDataset”

$w.onReady(function () {

    $w("#dynamicDataset").onReady(() => {
        
        $w("#dynamicDataset").getCurrentItem();

        if ($w('#button').link == '') {
            $w('#button').hide();
        }
                
    });

});

:grin:

1 Like