You need to sign in to do that
Don't have an account?

Cannot save checkbox value in VF page
Hi! I am very new to visualforce page. I am trying to nest a very simple VF page with checkboxes within the event detail page. However, I cannot save my checkbox values. Every time I hit save, it refreshes the page and then the checked boxes become unchecked again. I do not know why that happens. Could anybody please tell me why and how I can fix it? Thank you very much!
<apex:page standardController="Event"> <apex:detail subject="{!event}" relatedList="false"/> <apex:form id="theForm"> <apex:pageBlock title="Event Check List" id="thePageBlock" mode="detail"> <apex:pageblockButtons > <apex:commandButton action="{!save}" value="Save" id="save"/> <apex:commandButton action="{!cancel}" value="Cancel"/> <apex:message for="save"/> </apex:pageblockButtons> <apex:actionSupport event="onclick" reRender="theBlock" action="{!save}"/> <apex:pageBlockSection columns="2" > <apex:inputCheckbox id="repregis" label="Representatives registered" onselect="{!event}"/> <apex:inputCheckbox id="boothregis" label="Booth registered"/> <apex:inputCheckbox id="payment" label="Payment made"/> <apex:inputCheckbox id="hotel" label="Hotel booked, if applicabale"/> <apex:inputCheckbox id="litsent" label="Literature sent"/> <apex:inputCheckbox id="boothsent" label="Booth sent"/> <apex:inputCheckbox id="promosent" label="Promotional materials sent"/> <apex:inputCheckbox id="Misc" label="Miscellaneous stuffs sent"/> <apex:inputCheckbox id="furniture" label="Furniture ordered"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> <apex:relatedList list="Attachments"/> </apex:page>
Once they are bound to a field they will load the value from the database, and save the value to the database when the standard save action is invoked.
Rob Kemper - OpFocus