You need to sign in to do that
Don't have an account?
Vivek Chaudhari
How make Date Field visible when check box is selected using custom controller?
I have following code
VF CODE
<apex:page docType="html-5.0" controller="DateSample">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputText >Select Date</apex:outputText>
<apex:input type="date" value="{!dat}" disabled="true" id="date1"/>
</apex:pageBlockSectionItem><br/>
<apex:pageBlockSectionItem >
<apex:outputText >Select</apex:outputText>
<apex:inputCheckbox value="{!check}">
<apex:actionSupport event="onClick" reRender="date1" action="{!visible}"/>
</apex:inputCheckbox>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
What is wrong with is code?...
VF CODE
<apex:page docType="html-5.0" controller="DateSample">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:outputText >Select Date</apex:outputText>
<apex:input type="date" value="{!dat}" disabled="true" id="date1"/>
</apex:pageBlockSectionItem><br/>
<apex:pageBlockSectionItem >
<apex:outputText >Select</apex:outputText>
<apex:inputCheckbox value="{!check}">
<apex:actionSupport event="onClick" reRender="date1" action="{!visible}"/>
</apex:inputCheckbox>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
What is wrong with is code?...
2. Use a merge field for disabled (or you can use the rendered attribute too), with a boolean variable whose value would be modified in the action function
3. Rerender the outputPanel
VF Updated
Apex:
Thanks,
Aditya
All Answers
2. Use a merge field for disabled (or you can use the rendered attribute too), with a boolean variable whose value would be modified in the action function
3. Rerender the outputPanel
VF Updated
Apex:
Thanks,
Aditya