Welcome to the nuBuilder Forums!

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

nuSubformRowObject checkbox on subform Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
andrea763
Posts: 32
Joined: Tue Oct 17, 2023 7:41 am
Has thanked: 5 times

nuSubformRowObject checkbox on subform

Unread post by andrea763 »

Hi i'm trying to set the value of a checkbox in a subform without success.
If i change the field type to text it works properly..
I use the following code..
Advice please.

nuSubformRowObject(event.target.id, 'checkboxname').val('0');
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: nuSubformRowObject checkbox on subform

Unread post by kev1n »

Hi,

Untested:

Code: Select all

const chkId = nuSubformRowObject(event.target.id, 'checkboxname').attr('id');
nuSetValue(chkId, true);
andrea763
Posts: 32
Joined: Tue Oct 17, 2023 7:41 am
Has thanked: 5 times

Re: nuSubformRowObject checkbox on subform

Unread post by andrea763 »

thank's kev1n, it works but, it returns only the saved value and not the actual status of the checkbox.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: nuSubformRowObject checkbox on subform

Unread post by kev1n »

Use nuGetValue(chkId) instead
andrea763
Posts: 32
Joined: Tue Oct 17, 2023 7:41 am
Has thanked: 5 times

Re: nuSubformRowObject checkbox on subform

Unread post by andrea763 »

you're the number one.
Thank's
Post Reply