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.

Display images on the Edit form using URL's in the db

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

Display images on the Edit form using URL's in the db

Unread post by Paul »

I have image url's that are stored in the database as 'image_url' for each record (these are unique, separate images and separate urls).
Those images reside on my local nubuilder site.
example:

Code: Select all

http://localhost/nuBuilder2/Uploads/Case%2012/Evidence/Photo/d_150_5.jpg
These URLS are entered on the Edit form in a separate field.

I want to retrieve the url from the database for the currrent record (#RECORD_ID#) and embed that url into html code so that the image is displayed on the Edit form. Each image for each record is unique.

How would I do that?
Last edited by Paul on Sat Oct 11, 2025 4:36 am, edited 1 time in total.
kev1n
nuBuilder Team
Posts: 4592
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 542 times
Contact:

Re: Display images on a form using URL's in the db

Unread post by kev1n »

1. Output an additional column like:
browse_columns.png
Display: CONCAT('<img src="', image_url, '" class="record-image">')
Title: Space character

2. In Custom Code -> Style add your style like:

Code: Select all

.record-image {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 8px;
  object-fit: contain;
}
3. Change the "Row Height" to e.g. 100
You do not have the required permissions to view the files attached to this post.
Paul
Posts: 158
Joined: Mon Aug 25, 2025 6:03 am
Has thanked: 30 times
Been thanked: 4 times

Re: Display images on the Edit form using URL's in the db

Unread post by Paul »

Not sure if you understood the goal. I edited the title of the original post. My apologies if that was not clear.
IMAGE.PNG
You do not have the required permissions to view the files attached to this post.
steven
Posts: 429
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 60 times
Been thanked: 55 times

Re: Display images on the Edit form using URL's in the db

Unread post by steven »

Paul,

Do you come from a rich family?


Steven
A short post is a good post.
Buy Kev a Coffee
Post Reply