How do I make text within an FAQ answer hyperlink-able/clickable?

Hey team!

I have a client that has some FAQ answers where they include email as well as phone number. I think a really great experience would be to make both those things clickable / hyperlinked so the customer can easily make that call to action.

I’m not sure how to go about doing it though, so any advice would be helpful!

Thank you!!
Susie

Hi @Susie_Xu - Great question!

Please find instructions on how to create & edit fields of Type: Rich Text here. Once you’ve added a Rich Text enabled field to the FAQ entity type you will be able to add clickable (hyperlinked) Phone Numbers & Emails.

Hi Susie,

You can also use the new CTA custom field type to accomplish this.

The CTA type comes with 3 subfields:

  • Label
  • Link
  • Link Type, with options for URL, Email, Phone or Other

What’s really cool about this is that you can enter an email or a phone number (or embed things like the email field or phone field) in the Link field, set the appropriate Link Type, and then use the built-in formatter in your component.js file for the card to magically format correctly depending on the link type specified in the Knowledge Graph.

This is what we do in many of the Theme’s card templates.

For example, here’s the CTA1 object in the Theme’s standard card:

CTA1: {
        label: profile.c_primaryCTA ? profile.c_primaryCTA.label : null, 
        iconName: 'chevron', 
        url: Formatter.generateCTAFieldTypeLink(profile.c_primaryCTA), 
        target: '_top', 
        eventType: 'CTA_CLICK', 
        eventOptions: this.addDefaultEventOptions()
      },

When the link type for an entity is set as an email, for example, we’ll make sure to append the mailto: so when a user clicks on the CTA it pops up their preferred mail client.

Hope that helps, Susie!

1 Like