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
Hareesh Damodar 6Hareesh Damodar 6 

Default checkbox set to true not work on visual force page

I have set the default value checkbox to TRUE, it works fine in standard edit page, however when we use custom VF page for create the record, the checkbox won't set to default values.
<apex:inputCheckbox value="{!account.TestCheckbox__c}"/>
My requirement is what default value configured in field configuration should be display in custom page dynmaically , hence selected ="true" attribure not helpful in my requirement.
Do you know how to display the default values of checbox in VF page?

Appreciate your response.
Best Answer chosen by Hareesh Damodar 6

You need to use <apex:inputfield> as it respect default values set for field.I checked it and it works fine. for eg.

<apex:inputField value="{!Step__c.IsSkipped__c}"/>

Please let us know if it resolves your issue and mark this question as solved