How to make CustomField value clickable?

Jamshaid
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2022

I am working on a scenario where I need to set a default value for a TextField and need to make it clickable as it is a link to a website. 

I know that a text field descriptor can be used to add a clickable link in the descriptor field but I don't need it in the descriptor. I need the link and the descriptor both with separate texts. Is there any way I could populate the link as the default value in the text field and whenever the screen appears, it shows the default value and that default link is clickable as well?

Is there any other CustomField that can do this kind of stuff if Text Field does not support it? 

 

as.png

1 answer

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2022

Hi @Jamshaid -

There is a URL Field custom field type that might do what you want?

And you can set a default value for these types of fields.

Jamshaid
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2022

Hi @Darryl Lee 
Can I make it clickable and pre-populate the value? 

Thanks 

Jamshaid
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2022

@Darryl Lee 

Could you please give some reference to it as I am unable to find any? 

Thanks 

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2022

Hi, sure! Here's the official documentation, which I highly recommend reading in full, as you want to be careful not to create too many custom fields:

Managing custom fields 

You would be setting up a new Custom Field of type URL, and then setting the default value in the context for that field. There's details on that here:

Configuring custom field contexts 

Jamshaid
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2022

@Darryl Lee 
Hi 

I have created a URL Field but the value is not clickable. I have setup the value using a script through script runner.

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 6, 2022

Hi @Jamshaid -

I see in your other question that when you set the value you include HTML with the <a href> anchor tags. I'm pretty sure you should only be setting the URL as the value.

Suggest an answer

Log in or Sign up to answer