You need to sign in to do that
Don't have an account?
Ram Chaturvedi
I want to skip a vf tag on the basis of a condition ?
<script type='text/javascript'>
var temp12 = 'false';
if(temp12 == 'true'){
<apex:inputField value="{!task.Chosen_object__c}" required="true" onchange="showObjects()" id="chooseObj"/> <br/>
}
else{
<apex:outputField value="{!task.Chosen_object__c}" required="true" onchange="showObjects()" id="chooseObj"/>
}
</script>
var temp12 = 'false';
if(temp12 == 'true'){
<apex:inputField value="{!task.Chosen_object__c}" required="true" onchange="showObjects()" id="chooseObj"/> <br/>
}
else{
<apex:outputField value="{!task.Chosen_object__c}" required="true" onchange="showObjects()" id="chooseObj"/>
}
</script>
E.g. <apex:inputField value="{!task.Chosen_object__c}" required="true" onchange="showObjects()" id="chooseObj" rendered="{!temp12}"/> <br/>
This will render if temp12 is true. It would need to be bound from the controller class though.
However, if can not, then you should go with javascript. Have this input field on the page and then based on the flag change the css to show'hide.
Cheers!