Hey everyone!

With the holiday season upon us, we want to share our upcoming working hours:

After that, we’ll return to our regular schedule and assist you as quickly as possible.

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.

Thanks a bunch for your understanding and support!

Warm regards and happy holidays!

TMS

Okay
  Public Ticket #3517063
Don't turn url fields into links when nothing is left of pipes
Closed

Comments

  •  1
    Uriahs started the conversation

    Right now the URL field type lets you create links in this format:

    https://google.com||Google

    Which would result in: Google inside the table.

    But there are situations where you might want to use this column for both links and text, and if nothing is added to the left, then WPDT should leave it as plain text.

    Use case:

    I'm allowing users to upload attachments via a form and then saving that form data to the DB. Sometimes users might add attachments, and sometimes they might not. When they add attachments, I'm storing the link to the attachment(s) path inside the attachments column in the DB and using WPDT url field type to make the link clickable.

    So the admin would see a button for View which they click and then get the list of attachments the user attached. Now what about when they don't add any attachments?

    I'm simply storing ||No attachments the thing is, that gets turned as a URL which just redirects to the same page...it would be best to just have plain text show when there is nothing to the left of the pipes

  •  1,847
    Miloš replied


    Hi Uriahs,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    I can see what you mean, and i understand the use-case.

    That will not be possible if you have to use the URL Column Type with our Plugin.

    In our URL Column type - if there is not a combination of "||" in the cell, then it will just simply render it as a clickable link, whatever is placed inside the cell.

    At the moment, we are not able to change that, but if you have an idea how it can be improved specifically for the URL column, you can make a development suggestion.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.

    -

    For the time being, when you wish some cells to be rendered as clickable Links, some cells not;

    Or if you wish to have part of the cell as a clickable link, while something else next to it in the same cell such as text or image might be there, but not clickable;

    You can achieve this with our String Type Column.

    In the String Column you can write Custom HTML, then wrap your link/ or hyperlink inside the HTML anchor Tag.

    You can add the "target blank" attribute if it needs to open in a new tab;

    And you can add any plain Text/ image or anything else next to it in the same cell, and you will achieve just that link to be clickable, while the rest of the cell won't be.

    That is the only way at the moment, if you format the cells with Custom HTML.

    But if i understand, you will be using an "Attachment" Field as the Editor Type, so that users can upload the file in the Table?

    If that is the case, the same 'rendering rules' apply.

    You can only try to use "One line" or "Multi Line" Editor after they have uploaded it to the Table, and change that Column Type from URL to String in our Plugin - then you can edit the cell and construct your Custom HTML to achieve what needs to be 'clickable' and what does not.

    I hope that  helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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