function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HongjunHongjun 

inputfield for checkbox not displaying in wizard

I am working on a wizard kind of pages. There are two ages and if I return from the second page back to first page, all other values are displayed correctly except apex:inputfield that is checkbox field.

It will display correctly if using tag apex:inputCheckbox. But the label that is defined in the object custom field  will not be displayed.

Does anybody know why apex:inputfield is not displaying the value for checkbox? Thanks.

asish1989asish1989

Hi

you can refer this code

 

<apex:outputLabel value="Opportunity Name"
                            for="opportunityName"/>
          <apex:inputField id="opportunityName"
                           value="{!opportunity.name}"/>
HongjunHongjun

My problem is: even the value is set to be true, the inputfield still shows unchecked. But if I use inputCheckbox, it does show as checked.

HongjunHongjun

Answering my own question. The problem is because the button to go back to previous page has immediate="true". And that causes some input fields as apex:inputfield not displaying correctly.