function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aivaras GeraltauskasAivaras Geraltauskas 

Change checkbox value in flow/visualforce page

Hi,

I have a flow which has multiple checkboxes. The results from these checkboxes are stored in a text template and this text template is then assigned to a custom field (Rich Text Area). I then call this field in a visualforce page. This returns results in this format:
         Checkbox 1: False
         Checkbox 2: True

I need it to return:
         Checkbox 1: Complete
         Checkbox 2: Incomplete

Is there a way to change this? I have tried different things on the visualforce page but I am not very experienced with html/css, etc. Any ideas would be greatly appreciated.

Kind Regards,
Aivaras.


 
David Zhu 🔥David Zhu 🔥
You may implement this by manipulating the selectionOption key-value pairs.

<apex:selectCheckboxes value="{!options}">
    <apex:selectOptions value="{!items}"/>
</apex:selectCheckboxes>


public List<SelectOption> getItems() {
   List<SelectOption> options = new List<SelectOption>();
      options.add(new SelectOption('Complete','True'));
      options.add(new SelectOption('Incomplete','False'));
   return options;
}