Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Make a URL a clickable link

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
Paul
Posts: 135
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 29 times
Been thanked: 3 times

Make a URL a clickable link

Unread post by Paul »

In the browse form, I have some url's.
Browse-urls.PNG
Ultimately, I'd like to wrap those urls in html to make them clickable when displayed on the Print page (and downloaded/saved) when using the Print button.
print-button.PNG
Clickable-link.PNG
How to accomplish this?
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4584
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 536 times
Contact:

Re: Make a URL a clickable link

Unread post by kev1n »

Do I understand correctly that the links in the browse view are not supposed to be clickable — only in the “print” mode?
Maybe one possible solution would be to add an additional column in the browse view that contains the clickable URL, but keep it hidden there.
Then, when “print” is clicked, that column could be shown instead?
Paul
Posts: 135
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 29 times
Been thanked: 3 times

Re: Make a URL a clickable link

Unread post by Paul »

Yes, your idea as stated above might be the solution. How would I implement that?
kev1n
nuBuilder Team
Posts: 4584
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 536 times
Contact:

Re: Make a URL a clickable link

Unread post by kev1n »

For each URL field, create an additional column that contains the same URL wrapped in an <a> tag.

Example:
browse_url.png
In this example, the original column is named url_audio.
The second column, which displays the clickable link, is defined as:

CONCAT('<a href="', url_audio, '" target="_blank">Audio</a>')

Set the width of the clickable column to 0, since it should not be visible in the Browse view.

Then, in Custom Code → Browse Field, exclude the non-clickable column and include the clickable one:

Code: Select all

nuPrintExcludeColumns([0]); // Exclude the plain URL column
nuPrintIncludeColumns([1]); // Include the clickable URL column
Of course, if you’re already using nuPrintIncludeColumns() or nuPrintExcludeColumns(), you’ll need to merge your column lists accordingly.
You do not have the required permissions to view the files attached to this post.
Post Reply