You need to sign in to do that
Don't have an account?
mdinatale
How to set default on checkbox
I Have a checkbox that the default checked is set in the object. I created a visualforce page with the checkbox. But when i hit the new button it is not checked. How do i make the default value checked. Thanks
<apex:inputCheckbox value="{!Debt_Info__c.Round_Payment__c}" />
Use selected attribute like
That works if its new, but what if its on edit, even though its false it still comes up checked.
If it is your field's data type is Check box, You can assign the default value at the creating of the field. Then use apex:inputField in VF page.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Have you used any controller or extension?? If yes then you can pass the default value for the checkbox in the constrcutor. And in the vfpage use your code it will work fine.