Jump to content
X2Community Forums

Recommended Posts

Hi Guys,


Do you know if it is possible to ad a custom field to display a hyperlink.


For example, i have some custom fields that currently hold a link to a website, the link however is quite long and wraps around the whole table, it works just fine but just want to neaten it up abit.


We currently just fill in the data straight into the database and it displays with the whole web address.


For example the link is www.google.com/thisisalongwebaddress?user=123&id=123456 ......


I would like see if its possible to replace that whole link with a hyperlink that points to that address, i have tried just using html code to encapsulate the address but the whole text just displays instead.




Thanks in advance



Link to post
Share on other sites

Hey John,


To create a custom field to render the link, you'll need your original field to use as the source data (the URL). You can also add another field for the link text if you'd like. For example, with the fields c_siteUrl and c_siteLabel, you would create a custom field of type 'HTML' as follows:

<a href="{c_siteUrl}">{c_siteLabel}</a>


Link to post
Share on other sites

Hi Raymond,


Thanks for the information. In my current version i dont have an option for HTML, i might have to update to a newer version to include this. I can only See URL as the closest option available. (Current Version X2Engine 4.1.7 Open Source Edition )


Once i have upgraded, do i just add the HTML data in the database and then it will display properly in the form>? 



Link to post
Share on other sites

Ah, yes, that's correct, you'll need to update for that feature. Once you've updated, you won't even need to touch the database, it can be done through the field manager. When adding your new field, select the field type as "Custom," which will reveal  form controls allowing you to select the sub type of 'HTML'. You can then update your form layout to include this custom field in a "view" layout, and present the two other fields for the URL and label in the "form" type layout.

Edited by X2Raymond
Link to post
Share on other sites
  • 5 years later...

I need to do this as well, to add a link and the text as "Accept terms of service" when clicked on this text it will redirect to a website. 


I saw the option custom field, do i need to choose, Type: HTML, and then what the attributes should i select? and what should i put in the template here? please assist. Thank you

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...