Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Select Object

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Select Object

Unread post by BDemeuse »

Hi,

I have added 3 "select" objects in a browse&edit form and I have 2 questions where the 2nd and 3rd values depend on the 1st one
1° why the first value returned by the sql select is a "blank" value ?
2° How can I get the value of the first object to use it in the select of the 2nd and 3rd ones with the "add" function.
It is ok with the edit function (modify) when the record has been created.

Thanks in advance

Bri
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4299
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Select Object

Unread post by kev1n »

Hi,

The first option is always empty in nuBuilder.
Use nuSelectRemoveEmpty('select_obj_id') to remove it.

I'm not sure I understand the second question.
With nuRefreshSelectObject() you can refresh select 2 and 3 when select 1 changes.
BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Select Object

Unread post by BDemeuse »

Where/which step to use these nubuilder functions? In Javascript ?
in 'Before Edit' seems too soon ?

Thanks
kev1n
nuBuilder Team
Posts: 4299
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Select Object

Unread post by kev1n »

nuSelectRemoveEmpty() can be called when the form is loaded (in the Custom Code)
Call nuRefreshSelectObject() in the select's onchange event.

You will also find a demo of cascaded selects at https://demo.nubuilder.cloud/
BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Select Object

Unread post by BDemeuse »

What do you mean by when the form is loaded ?
In Custom Code, I see only BB, BE, BS, AS, BD, AD
kev1n
nuBuilder Team
Posts: 4299
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Select Object

Unread post by kev1n »

kev1n
nuBuilder Team
Posts: 4299
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Select Object

Unread post by kev1n »

Please let me know if you need further assistance in this matter.
BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Select Object

Unread post by BDemeuse »

Thanks Kevin.
I will investigate later because I am still occupied on another development ;-)
However demo.nubuilder.cloud does not work -> Not Found.
Anyway, I will let you know
Regards,

Bri
kev1n
nuBuilder Team
Posts: 4299
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Select Object

Unread post by kev1n »

This correct link is https://demo.nubuilder.cloud
BDemeuse
Posts: 92
Joined: Mon Apr 12, 2021 3:09 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Select Object

Unread post by BDemeuse »

Thanks to your explanations and demo, everything are working well :-) :-) and before nuBuilder I never had developed (and learnt) either javascript or php !!
But the adventure is not yet finished ;-)
Post Reply