dependent dropdown in a subform

Questions related to customising nuBuilder Forte with JavaScript or PHP.

dependent dropdown in a subform

Unread postby johan » Fri Sep 10, 2021 6:56 pm

Hi
How can I create a dependent dropdown in a subform?
sectie depents on gevangenis.
Selectie_322.png
Selectie_322.png (20.67 KiB) Viewed 97 times


My code in object select is
Code: Select all
SELECT distinct secties.sec_id, secties.sec_name FROM secties
inner join gevangenis  on gevangenis.gev_id = secties.sec_gevangenis
where  secties.sec_gevangenis = '#res_gevangenis#'


Sectie returns empty.

What am I doing wrong?
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: dependent dropdown in a subform

Unread postby kev1n » Fri Sep 10, 2021 8:16 pm

Hi,

Try the attached nuform.js. Replace yours with the one from the attachment and then log in again into nuBuilder.
Attachments
nuform.zip
(27.88 KiB) Downloaded 7 times
kev1n
nuBuilder Team
 
Posts: 2008
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: dependent dropdown in a subform

Unread postby johan » Mon Sep 13, 2021 5:07 pm

Kev1n
I've replaced nuForm.js but still the same result.

Johan
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium

Re: dependent dropdown in a subform

Unread postby johan » Thu Sep 16, 2021 2:12 am

Today I've updated my nubuilder tot the latest version on github hoping that this should solve the problem.
I still don't get info in the diepending select.
Any idea?
johan
 
Posts: 340
Joined: Sun Feb 27, 2011 7:46 pm
Location: Belgium


Return to Custom Code

Who is online

Users browsing this forum: No registered users and 7 guests

cron