Page 1 of 1

Check Hyperlink Field on Display

Posted: 23 Oct 2018
by munmon
Tried to use the info from here:

viewtopic.php?f=1&t=1986&p=6345&hilit=hyperlink#p6345

Code: Select all

if(fd.field('URL').value()[0] == " "){
	alert('Empty!');
}
But does not work. Here is my code I use to test the rule....

Code: Select all

// Enable or disable 'Resolution' tab
function setResolutionTab() {
    var UserNote = $.trim(fd.field('UserNote').control()._el().text());
    if (UserNote == "") {
        $('#fd_tabcontrol-0').tabs('option', 'disabled', [2]); // Disable
    } else {
        $('#fd_tabcontrol-0').tabs('option', 'disabled', null); // Enable
    }

}

var RequestDocumentTitle1 = $.trim(fd.field('RequestDocumentTitle1').control()._el().text());
if (RequestDocumentTitle1 == "") {
    alert('Empty!');
} else {
    alert('Not Empty!');
}


if (fd.field('LargeFileLink').value()[0] == " ") {
    alert('Empty!');
} else {
    alert('Not Empty!');
}


// Initialize
setResolutionTab();
What I did wrong.

The Tab Hide.. Works... The alert for Field "RequestDocumentTitle1" works... But the checking on Hyperlink Field "LargeFileLink" not working, BTW, this is for Form Display.

Please assist.

Re: Check Hyperlink Field on Display

Posted: 23 Oct 2018
by munmon
If I make a reference to Hyperlink Field like this...

Code: Select all

var LargeFileLink = $.trim(fd.field('LargeFileLink').control()._el().text());
it works.