sachin_namjoshi
Mega Patron

You can do it with onload client script.

Below is the example script.

 



The below script assumes the name of the field is "u_url" and it has a value of "Click here".



function onLoad() {
g_form.getControl('u_url').style.color = 'blue'; // Set text font color to blue
g_form.getControl('u_url').style.textDecoration = "underline"; // Set text decoration to underlined
g_form.getControl('u_url').onmouseover = mouseOver; // Set mouseOver cursor style
g_form.getControl('u_url').onclick = urlFunction; // Set onclick to the redirect url
}

function mouseOver() {
this.style.cursor = 'hand'; // Set onmouseover cursor style
}

function urlFunction() {
window.top.location.href = 'http://www.google.com'; // This is the url that the user will be redirected to
}

Regards,
Sachin

After clicking that is not getting opened in next tab

Yogita11__0-1730790044820.png

 

Not applicable
g_form.getControl('u_url').target = "_blank";  // open in new tab

Hi,

Can you please help with the field type.

Aditya_hublikar
Mega Sage

Hello @Pihu1 ,

 

Here it look like :

Aditya_hublikar_0-1781599309162.png

 

 

You can try this code snippet :

function onLoad() {
    var fieldName = 'u_incident'; 
    var placeholder = "##placeholder##";
    var url = "https://google.com"; /
    
   
    g_form.showFieldMsg(fieldName, placeholder, 'info', false);
    
 
    try {
        var elements = document.getElementsByClassName("fieldmsg notification notification-info");
        if(elements.length > 0) {
            var str = elements[0].innerHTML;
            str = str.substring(0, str.indexOf(placeholder));
            elements[0].innerHTML = str + 'Please <a href="' + url + '" target="_blank">click here</a> for more information.';
        }
    } catch(e) {
        // Fallback or error handling
    }
}

 

Note : uncheck isolated script 

 

 

If this helps you then mark it as helpful and accept as solution.

Regards,

Aditya