Show all checkbox values in read mode too!

For when you always want to display the full list in edit and read mode. It will show which values are checked.
HTML • Lotus Formula • Lotus Notes Form

Create a hidden "Computed For Display" field and name it "ChecklistChoices". Formula should result in a list array. Example:

"Value 1" :
"Value 2" :
"Value 3" :
"Value 4" :
"Value 5" :
"Value 6" :
"Value 7" :
"Value 8" 

Create a standard checkbox field and name it "MyChecklist". Allow multiple values and have it only be visible in edit mode. Select "Use Formula For Choices" and enter the reference below.

ChecklistChoices

Create a "Computed For Display" field and name it "MyChecklist_disp". This field should only be made visible in read mode. Use the following formula:

choices := ChecklistChoices;
Len := @Elements(choices);

@For(n:=1; n<=Len; n:=n+1;
	tmp := tmp + "<input type=\"checkbox\" disabled=\"true\"" + @If(@IsMember(choices[n]; MyChecklist) ; " checked" ; "") + ">" + choices[n] + "<br>"
);

@If(
	MyChecklist="" ; "";
	tmp
)

Images/Screenshots:







Posted by fbrefere001 on Tuesday February 12, 2013