Can I populate Lead fields (State and Country) from pick lists in a web form - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Mike McGeoyMike McGeoy 

Can I populate Lead fields (State and Country) from pick lists in a web form

We have a couple of Web-2-Lead forms in which we want to control the State and Country fields with picklists so as to minimize garbage in those fields. For various reasons have chosen NOT to implement the State & Country pick list functionality in SFDC.  Will this be possible to do without writing special code in the web form to achieve this end goal?

 
Brendan ConroyBrendan Conroy
Hi Mike,

I think that you'd just have to update the web form itself with the picklist values and since the standard fields for state and country are text, they should just get whatever data is entered into the field on the webform. 
Mike McGeoyMike McGeoy
Hi Brendan,

The webform does have the picklist values but when submitted the fields are not  being populated with the slected value.  Here is  snippet from the HTML on the web-2-Lead from...
 
<label for="city">* City:</label>
    <input id="city" class="required" maxlength="40" name="city" size="20" type="text" />

 <label for="country">* Country:</label>
    <div input id="country" class=" control-wrap-select"> <select id=" country" class="required" title="Country" name=" country"><option value="">--None--</option>
            <option value="United Kingdom">United Kingdom</option>
            <option value="United States">United States</option>
            <option value="-----">-----</option>
            <option value="Afghanistan">Afghanistan</option>
            <option value="Albania">Albania</option>
            <option value="Algeria">Algeria</option>
            <option value="American Samoa">American Samoa</option>

 
Brendan ConroyBrendan Conroy
Hi Mike, And that generates when you add the country field outright? If so, state/country picklists seem to be on.