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
Jack A 2Jack A 2 

How to save checkbox value to corresponding field of the object?

I have a visualforce page that contains some Questionnaire and for that I have created yes and no inputcheckbox and corresponding to that checkbox on visualforce page I have fields in my custom object. Now what I want is that when user check the checkbox on the visualforce page then I want to be checked the checkbox in my field also.
 
<apex:page sidebar="true" showHeader="false" standardStylesheets="false"> 

  5. Have you paid off any existing debt in the last 12 months?<br></br>
 <apex:pageBlockSection >
 <apex:inputCheckbox label="Yes" />
 <apex:inputCheckbox label="No" />
 </apex:pageBlockSection>
<apex:commandButton value="Submit" action="{!save}"/>
</apex:page>

 
Best Answer chosen by Jack A 2
Jack A 2Jack A 2
I have same code as above only object and field is diffrent
 

All Answers

Jack A 2Jack A 2
 getting error as <apex:inputCheckbox> must contain only a formula expression that resolves to a single controller variable or method
Jack A 2Jack A 2
I have same code as above only object and field is diffrent
 
This was selected as the best answer