Check Hyperlink Field on Display

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
munmon
Posts: 4
Joined: Tue Nov 01, 2016

23 Oct 2018

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.

munmon
Posts: 4
Joined: Tue Nov 01, 2016

23 Oct 2018

If I make a reference to Hyperlink Field like this...

Code: Select all

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

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests