Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Checkbox field strange behavior Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
Uzlander
Posts: 70
Joined: Sat Jul 08, 2023 10:21 am
Has thanked: 15 times
Been thanked: 6 times

Checkbox field strange behavior

Unread post by Uzlander »

HI there!
So, i cloned an object, turned it into a checkbox and intended to assign it some function/logic.
To my surprise it outputs always 'ON' (probably meaning TRUE) no matter if its checked or unchecked
You do not have the required permissions to view the files attached to this post.
steven
Posts: 430
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 61 times
Been thanked: 56 times

Re: Checkbox field strange behavior

Unread post by steven »

Hi Uzlander,

What is the code that outputs this value to the console?


Steven
A short post is a good post.
Buy Kev a Coffee
Uzlander
Posts: 70
Joined: Sat Jul 08, 2023 10:21 am
Has thanked: 15 times
Been thanked: 6 times

Re: Checkbox field strange behavior

Unread post by Uzlander »

console.log('myCheckBox val: '+ $('#history_tab').val());
Uzlander
Posts: 70
Joined: Sat Jul 08, 2023 10:21 am
Has thanked: 15 times
Been thanked: 6 times

Re: Checkbox field strange behavior

Unread post by Uzlander »

Oh, pardon me, it should be $('#history_tab:checked').val() instead. Got it!
kev1n
nuBuilder Team
Posts: 4595
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 77 times
Been thanked: 546 times
Contact:

Re: Checkbox field strange behavior

Unread post by kev1n »

It's easier to use nuGetValue('history_tab') (retruns true, false)
Post Reply