Need help in adding a link in String type field
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2020 08:37 AM
Hi Community,
I need help in adding a link in String type field. How can we store a link/add a link in String type field ?
Any help would be greatly appreciated.
Thanks
Pihu
7 REPLIES 7
Options
- 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
Options
- 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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 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