+ Start a Discussion
ANKUR GUPTA 63ANKUR GUPTA 63 

apex:repeat inside pageblocksectionitem not working, can anyone help?

GovindarajGovindaraj
Hi Ankur,

Can you please share the VF page ?

Thanks,
Govindaraj.S
ANKUR GUPTA 63ANKUR GUPTA 63
  <apex:pageBlockSection showHeader="false" columns="1" id="block1">                         
                <apex:pageBlockSectionItem labelStyle="vertical-align:middle;">
                  
                        <apex:panelGrid columns="1">  
                            <apex:outputLabel value="Category: " for="category2" styleClass="label"><span class ="required"></span></apex:outputLabel>
                           <select class="selectpicker"  >
                            <apex:repeat value="{!wrapList}" var="category">
                                <option value="{!category.value}"  class="{!category.helpText}">{!category.label}</option>
                            </apex:repeat>
                        </select>  

                            <apex:inputField required="false" value="{!c.Sub_category__c }" styleClass="selectpicker" style="margin-left:9px;font-size:14px;color:#444;font-weight:300;"/>
                        </apex:panelGrid>
                            
                   
 </apex:pageBlockSectionItem>  
Rajesh_KumarRajesh_Kumar
Hi Ankur,
I think you are facing some markup issue with a select list. Please change your select option like below code.
<apex:selectList value="{!selectedVal}">
    <apex:selectOptions value="{!optionList}"/>
</apex:selectList>

Here is a blog will help you to create the dynamic select list. https://webkul.com/blog/how-to-create-dynamic-drop-down-in-visualforce-page/ (https://webkul.com/blog/how-to-create-dynamic-drop-down-in-visualforce-page/" target="_blank)