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
RajManiaRajMania 

Can Default checked, checkbox appear in visualForce as checked

I have create a field of type checkbox, and selected as default checked. Is it possible that it will appear as checked in VisualForce page on new form, by using <apex:inputField>

 

Thanks,

Raj

AmphroAmphro
The <apex:inputField> will display it as the value in the controller, which unless you change it, is the value in the database. So if it is checked as default, then yes, it will show as checked in VisualForce.
RajManiaRajMania

Thanks Amphro,

I have kept default as Checked but it is not working VF page, I have to manually set the value in Controller as true, is any alternative available

 

Regards,

Raj