Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
How to add extra 'description' boxes on lookup
How to add extra 'description' boxes on lookup
When creating a lookup you get the option to add another field of related data in an adjacent description box by selecting the field you want to be displayed. Is there any way to add extra boxes to show further data? Ideally I need to add 2 further boxes so that the user can, at a glance, see that they have selected the right record. I'm presuming I use the 'Display' type but I'm lost as to how to implement it to show the extra fields.
Re: How to add extra 'description' boxes on lookup
Thanks. I've created 2 new read-only 'input' boxes on the form and named them disp_houseno and disp_unitname and placed the below code into the AfterBrowse of the lookup but am not getting any response. Can you spot my error?
Code: Select all
$lu = nuLookupRecord();
nuSetFormValue('disp_unitname', $lu->UnitName);
nuSetFormValue('disp_houseno', $lu->HouseNo);
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: How to add extra 'description' boxes on lookup
Add to see what fields are output in nuDebug Results.
Code: Select all
nuDebug(nuLookupRecord());
Re: How to add extra 'description' boxes on lookup
I don't get as far as getting any debug message. As soon as I select a record in the lookup table I get the spinning wheel/egg-timer and nothing happens.
The console gives this
The console gives this
Code: Select all
Uncaught TypeError: $(...)[0] is undefined
resetIframes http://192.168.1.114/rcsdb/index.php line 2 > injectedScript:35
onclick http://192.168.1.114/rcsdb/index.php:3
index.php line 2 > injectedScript:35:15
Uncaught SyntaxError: expected expression, got '>'
nuPopulateLookup http://192.168.1.114/rcsdb/core/nuform.js?ts=20230314134425:4567
successCallback http://192.168.1.114/rcsdb/core/nuajax.js?ts=20230314134425:599
success http://192.168.1.114/rcsdb/core/nuajax.js?ts=20230314134425:15
jQuery 4
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: How to add extra 'description' boxes on lookup
Did you really place the code in After Browse? (and not the yellow LUJS field)
Re: How to add extra 'description' boxes on lookup
Another schoolboy error! You are spot on, I didn't realise that was a button to press to access the After Browse code box. I had indeed put it in the LUJS. All working now, so thanks again.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: How to add extra 'description' boxes on lookup
You're welcome! I'm glad to hear that everything is working now. If you have any more questions or need further assistance, feel free to ask.