I have a checkbox field with about 17 values in it. I’m using a computed value and some hidden fields to generate the code to appear in columns on the web. This is the code in the :
field_name:=“RequestList”;
columns:=2;
options:= RequestListChoices;
@If(!@IsDocBeingEdited; @Return(@Implode(@GetField(field_name); ", ")); “”);
count:=@Elements(options);
html:=“
| ”;
@For(n:=1; n<=count; n:=n+1; html:=html + "<input type="checkbox" "+@If(@Contains(@GetField(field_name); options[n]); “checked “; “”)+“name="”+field_name+”" value="” + options[n] + "" onchange="window.location.reload( false ); " /> " + options[n] + @If( @Modulo(n; @Round(count/columns) ) = 0; “ | ”; “ ”)); html + “ |
I have a hidden editable text field called RequestList and a hidden computed for display text field containing the following values:
“Mainframe Logon ID” : “Add’l Mainframe Logon IDs*” : “BAC Remote Access*” : “CCTS*” : “CSMS/ASSET$" : “DMV” : "Enterprise LDAP Roles” : “External Agency Website Access*” : “FED. ID*” : “LNotes*” : “LRS” : “MSTS*” : “MMTS*” : “NT” : “RISC 6000/AIX*” : “Secure ID*” : “TSO*” : “UNISYS Logon”
The code I’ve given above works great to display the values in formatted columns, however, considering I’m not working with a checkbox field anymore, I can’t use the property “Refresh fields on keyword change” since I’m using a computed value where the old checkbox field was and hidden text fields. I was able to put ‘refresh/reload’ javascript code in the onclick event in the html above, but I lose my values…the checkboxes are unchecked once clicked.
The purpose for the refresh and to keep what values were originally checked, checked…is because I have a lot of fields with hide whens according to what values are checked.
Any ideas?