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
Ashvin Jadhav 13Ashvin Jadhav 13 

Syntax error. Missing ')' in inputcheckbox apex tag

Hi All, 

I am using condition in selected attribute in inputcheckbox as, 
<apex:inputCheckbox selected="{!if (p.prod.in_stock__c == true ,true,false)}" disabled="true" />

where in_stock__c is a checkbox field so whenever the value of in_stock__c is checked my checkbox willl also be checked. 

but on saving it is giving me  Syntax error. Missing ')' error. 

Please help ! 

Thanks & Regards,
Ashvin
Best Answer chosen by Ashvin Jadhav 13
Alain CabonAlain Cabon
Did you try?

<apex:inputCheckbox selected="{! p.prod.in_stock__c }" disabled="true" />