Okay
  Public Ticket #3689358
Make phone number column clickable
Open

Comments

  • Chris Lambert-Shiels started the conversation

    How can I make a Phone Number column clickable?

    ie How do I create the following "tel:" link: 

    <a href="tel:123-456-7890">123-456-7890</a>

    from a CHAR or VARCHAR column containing values like "1234567890"

    Thanks

  •  1,767
    Miloš replied

    Hi Chris,

    Sorry for the waiting time.

    We don't work on weekends so it adds two days to the waiting time.

    we appreciate your patience.


    There could be a couple of different ways to achieve this.

    For example, you could 'spread' this data into multiple columns, then create Custom HTML and call placeholders as values from multiple columns in order to create a dynamic Custom String field which contains clickable Phone Number values.

    Please check this out on our Transform Value Feature here, you will find the details explained and our example of creating a phone number value like that.

    The Transform Value column setting allows you to transfer some of the values in your columns into links, mailing triggers, phone triggers, and images.

    You fill see our "Phone" example with screenshots there :

    8203959374.png



    It would look something like this :

    <a href="tel: {phone.value}">Call {student.value}</a>
    

    1351180888.png

    That was, of course, just our example if you wish to make hyperlinks with a custom displayed text.

    Or if you need a simpler solution, just to show the phone number as both the link and displayed hyperlink text, you can do a Transform value like this :

    <a href="tel: {phone.value}">{phone.value}</a>
    

    This way it would just pull both from the same "phone number column" and make the dynamic HTML link like that.

    I hope that helps. 

    Just note, this Column chosen for Transform value must be a String Column - no other column types can be used for it.

    Let me know if you encounter any issue.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables