Reputation: 14296
I have a page with a few fields, loaded from a DB table, such as:
Name: John Smith
ID: jsa44
State: MA
--Hidden--ActiveUser:yes
I want to display a checkbox that is checked when activeuser is yes and unchecked when activeuser is no. Also, I want to change the value of activeuser whenever the checkbox check status changes.
How would I do this?
Upvotes: 1
Views: 4421
Reputation: 132680
Instead of having ActiveUser as a hidden item, make it a Checkbox item with these attributes:
(Note Display Extra Values set to No).
Then add a computation like this:
(My item was called P1_X). This computation handles the fact that the unchecked value of a checkbox is always NULL, converting that to 'no'.
Upvotes: 3