+ Start a Discussion
Adam RycroftAdam Rycroft 

Make a checkbox default true in VF


I'm in the process of redoing javascript list buttons for lightning. We had a couple buttons that for the selected records, a checkbox field would be marked true which would result in a process builder starting.

I'm trying to use a VF button to do this, but how can I make the value of the checkbox in question marked true so the user just needs to click save for the records he or she has already selected?
<apex:page standardController="Rent_and_Damages__c" recordSetVar="Rent_and_Damages__c">
   <apex:form >
      <apex:pageBlock title="Create Next Month's Rent" mode="edit">
         <apex:pageMessages />
         <apex:pageBlockButtons location="top">
            <apex:commandButton value="Save" action="{!save}"/>
            <apex:commandButton value="Cancel" action="{!cancel}"/>
         <apex:pageBlockTable value="{!selected}" var="rent">
            <apex:column value="{!rent.name}"/>
            <apex:column headerValue="Create Rent">
               <apex:inputField value="{!rent.Create_Rent_for_Next_Month__c}"/>