- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2020 08:46 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 11:00 PM
After clicking that is not getting opened in next tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 11:19 PM
g_form.getControl('u_url').target = "_blank"; // open in new tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2025 10:18 AM
Hi,
Can you please help with the field type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
19 hours ago
Hello @Pihu1 ,
Here it look like :
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