You need to sign in to do that
Don't have an account?
rotfil
{!IF(fruit.fruit__c=='apple','selected','')} into a select option but oh no:
Element type "option" must be followed by either attribute specifications, ">" or "/>
Rubbish - how can I create a work around for this?
Dropdown selected error - Element type "option" must be followed by either attribute specifications, ">" or "/>
<apex:repeat var="fruit" value="{!fruit}" id="fruit"> <select class="form-control" id="fruit"> <option value="Apple" {!IF(fruit.fruit__c=='apple','selected','')}>Apple</option> </select> </apex:repeat>All I want to do is put the following like of code
{!IF(fruit.fruit__c=='apple','selected','')} into a select option but oh no:
Element type "option" must be followed by either attribute specifications, ">" or "/>
Rubbish - how can I create a work around for this?
I think you missed "selected"
Try this code once
Let me know if it works.
Thanks.
All Answers
I think you missed "selected"
Try this code once
Let me know if it works.
Thanks.