You need to sign in to do that
Don't have an account?
SFDCAdmin73
VF Page - States List not appearing when United States is selected for country?
We have a custom signup form our support site. On the form we have a country and states picklist. When the user selects United States as a value for Country field, no values are appearing on the States List. See image below and VF page code. I am not sure why values for the State list are not appearing.
VF page code section referencing Country and State list:
VF page code section referencing Country and State list:
<apex:outputLabel styleClass="regLabel" value="Country" for="country"><font color="red" >*</font></apex:outputLabel> <apex:selectList value="{!country}" size="1" id="countryList" required="true" onchange="renderStateAS(this.value)" style="width:150px;"> <apex:selectOptions value="{!countries}"/> </apex:selectList> <apex:outputLabel styleClass="regLabel" value="State/Province" for="stateProvince" /> <apex:selectList value="{!stateProvince}" size="1" id="StateList" > <apex:selectOptions value="{!states}"/> </apex:selectList> <apex:outputText value=""/> <apex:outputText value=""/> <apex:outputText value=""/> <apex:commandButton action="{!registerUser}" value="Create Account" id="submit" styleClass="submitButton"/> </apex:panelGrid> <apex:actionFunction name="renderStateAS" action="{!renderState}" reRender="StateList" immediate="true"> <apex:param name="CountryParam" value="" assignTo="{!country}" /> </apex:actionFunction> </apex:form> </apex:outputPanel> </center> <script> function populateUserName(compVal){ $("[id$=userName]").val(compVal); if(compVal != null && compVal.length > 0) var compValSplit = compVal.split('@'); $("[id$=communityNickname]").val(compValSplit[0]); } </script> </div> </apex:define> </apex:composition> </apex:page>