Page 4 of 4
Re: dependent dropdown in a subform
Posted: Mon Nov 22, 2021 2:29 pm
by johan
Kev1n
I still got the same result in my subform. Only Turnhout in the first row gevangenis and the rest is blanc.
Johan
Re: dependent dropdown in a subform
Posted: Mon Nov 22, 2021 2:32 pm
by kev1n
Can you export your db again?
Re: dependent dropdown in a subform
Posted: Mon Nov 22, 2021 3:34 pm
by johan
Kev1n
Thanks for your help.
Johan
Re: dependent dropdown in a subform
Posted: Mon Nov 22, 2021 3:51 pm
by kev1n
I forgot to mention that the SQL is messed up:
Code: Select all
SELECT distinct secties.sec_id, secties.sec_name FROM secties where secties.sec_gevangenis = WHERE secties.sec_gevangenis = '#VALUE_SELECT1#'
OR '#VALUE_SELECT1#' LIKE '#%';
This is correct:
Code: Select all
SELECT distinct secties.sec_id, secties.sec_name FROM secties
WHERE secties.sec_gevangenis = '#VALUE_SELECT1#'
OR '#VALUE_SELECT1#' LIKE '#%'
Re: dependent dropdown in a subform
Posted: Sat Nov 27, 2021 12:02 pm
by johan
Kev1n
Thanks a lot for your help. Now the items on subform are populated correct.
Since this change I occur a problem with depending select using
Code: Select all
("#act_lokaal").empty();
nuRefreshSelectObject('act_lokaal');
$("#act_sectie").empty();
nuRefreshSelectObject('act_sectie')
Could it be that there is a conflict with subform items?
Re: dependent dropdown in a subform
Posted: Sat Nov 27, 2021 12:25 pm
by kev1n
Replace the function nuRefreshSelectObject() in nucommon.js with this one and log in again:
Code: Select all
function nuRefreshSelectObject(selectId, formId, removeBlank) {
if (typeof formId === 'undefined') {
var formId = '';
}
nuSetProperty('nurefreshselectobject_selectid',selectId);
nuSetProperty('nurefreshselectobject_formid',formId);
nuSetProperty('nurefreshselectobject_prefix','');
nuSetProperty('nurefreshselectobject_removeblank',removeBlank === true ? '1' : '0');
nuRunPHPHidden('nurefreshselectobject', 0);
}
Re: dependent dropdown in a subform
Posted: Fri Dec 03, 2021 2:17 pm
by johan
kev1n
I finaly could test this and it works fine.
Thanks a lot for your help!
Johan
Re: dependent dropdown in a subform
Posted: Fri Dec 03, 2021 2:18 pm
by johan
kev1n
I finaly could test this and it works fine.
Thanks a lot for your help!
Johan