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

Why rerender not working for the new record?
Hi,
I have a visualforce page code below. Basically a checkbox and a input text, by click checkbox, show inputtext, uncheck it, not show input text. It works perfectly fine when edit a record. But when I create a new record, it isn't working. Any ideas?
<apex:outputPanel id="otherPrograms">
{!OSFS_Grad_Student_Supplement__c.Other__c}
<apex:pageBlockSectionItem >
<apex:inputcheckbox value="{!OSFS_Grad_Student_Supplement__c.Other__c }" id="Other">
<apex:actionSupport event="onchange" rerender="otherPrograms" />
</apex:inputcheckbox>
<apex:outputLabel value="Other (List Program:)" for="Other"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:InputField value="{!OSFS_Grad_Student_Supplement__c.Other_Programs__c}" rendered="{!OSFS_Grad_Student_Supplement__c.Other__c}" />
</apex:pageBlockSectionItem>
</apex:outputPanel>
I have a visualforce page code below. Basically a checkbox and a input text, by click checkbox, show inputtext, uncheck it, not show input text. It works perfectly fine when edit a record. But when I create a new record, it isn't working. Any ideas?
<apex:outputPanel id="otherPrograms">
{!OSFS_Grad_Student_Supplement__c.Other__c}
<apex:pageBlockSectionItem >
<apex:inputcheckbox value="{!OSFS_Grad_Student_Supplement__c.Other__c }" id="Other">
<apex:actionSupport event="onchange" rerender="otherPrograms" />
</apex:inputcheckbox>
<apex:outputLabel value="Other (List Program:)" for="Other"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:InputField value="{!OSFS_Grad_Student_Supplement__c.Other_Programs__c}" rendered="{!OSFS_Grad_Student_Supplement__c.Other__c}" />
</apex:pageBlockSectionItem>
</apex:outputPanel>
It seems like the issue might be related to the initial state of the checkbox when creating a new record. Make sure to check if the Other__c field is set to true by default in the record's initial state. This will ensure that the input text is shown when creating a new record. Double-check the default value in your object's schema settings. For more visit : https://bodyly.nl/decaduro-recensie-deca-durabolin-kopen/