We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #2271088
Best Way to Add Markup to Links
Closed

Comments

  • Jocelyn started the conversation

    Hello! I need to add some styling and code to web links before they are saved, so they can be rendered correctly in a mobile app. If the user adds either a phone number or url I need them marked up per the attachment. 

    What would be the best tool or approach for this? A function, action, or something in the column itself such as the cell content prefix or suffix? Or conditional formatting?

    The table column is defined as a link but could be a url or phone number. 

    Thank you!

  •  2,576
    Aleksandar replied

    Hello Jocelyn.

    I believe the best way to go about this would be through hooks - Filters.

    If I'm not mistaken, for URL you'd need wpdatatables_filter_link_cell( $formattedValue, $tableId )

    This filter is applied to the value of an URL link column before it is passed to the front-end.

    $formattedValue is the value of the cell.

    $tableId is the table identifier from the MySQL table (wp_wpdatatables).

    For the phone number - I'm not sure if it would work, and perhaps you'd need to add a different filter to check if the column contains only integers, or if it's a string type column from which only numbers would be recognized and added to the URL.

    Kind Regards, 

    Aleksandar Vuković
    [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