Question

Convert the text field to the hyperlink

Hi,

 

I would like to put a hyperlink to an external source on the contact page (not in the link and attachment tab but in the main info). Is it possible to convert the text field to the hyperlink?

Like 0

Like

2 comments

Hello Paulina,

 

Hope you're doing well.

 

In case you would like to make the field a hyperlink you will need to use development tools. Here you can find the approximate algorithm on how your business task can be performed:

  • You will need to modify diff of the needed field in the next way:
diff 
{
	"operation": "insert",
	"name": "AdditionalExpenses",
	"values": {
 
		// -->
		"showValueAsLink": true,
		"controlConfig": {
			"enabled": true,
			"href": {
				"bindTo": "getAdditionalExpensesLink"
			},
			"linkclick": {
				"bindTo": "onExternalLinkClick"
			}
		},
		// <--
 
		"layout": {
			"colSpan": 12,
			"rowSpan": 1,
			"column": 0,
			"row": 3,
			"layoutName": "Tab07720f4eTabLabelGridLayout691629ea"
		},
		"labelConfig": {},
		"enabled": true,
		"bindTo": "AdditionalExpenses"
	},
	"parentName": "Tab07720f4eTabLabelGridLayout691629ea",
	"propertyName": "items",
	"index": 5
},
  • After that, please add such code to the methods:
methods: {
 
	getAdditionalExpensesLink: function() {
		return this.getLink(this.get("AdditionalExpenses"));
	},
	onExternalLinkClick: function() {
		return;
	},
	getLink: function(value) {
		if (Terrasoft.isUrl(value)) {
			return {
				url: value,
				caption: value
			};
		}
	}
},

As a result, the needed field will be a hyperlink field if you will populate it with the appropriate link format (or just copy and put it from the browser address bar).

 

Best regards,

Roman

Hi Paulina,

I've written up the steps to convert the text field to a clickable hyperlink here: https://customerfx.com/article/how-to-format-a-url-as-a-clickable-link-…

Ryan

Show all comments