Because data values can vary from source to source for fields like State, Country, Title, Industry, etc., we've kept these fields as a free-form TEXT field in DemandCenter. While this allows you the maximum flexibility when importing lists and otherwise inserting records in to your database, we do recognize that this practice can lead to a wide range of data in your database.
To help with normalizing the data that comes into these fields, a common practice is to code your forms so that these types of field(s) appear to visitors as single-select picklists (drop-down) menus. By restricting the selectable field values to a predetermined list of picklist options, you can ensure that the data entering your database from forms, will meet your organization's standards.
For standard eTrigue forms, to change a form text field appear as a single-select picklist (drop-down) menu:
- On the web page that contains your eTrigue form, find the code that looks like this:
<input type="text" name="x_state" value="" />
- Replace the line of code found in step 1 with the entire snippet of code below:
<select name="x_state">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="DC">Washington DC</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
<option value="ALTA">Alberta</option>
<option value="BC">British Columbia</option>
<option value="MAN">Manitoba</option>
<option value="NB">New Brunswick</option>
<option value="NFLD">Newfoundland</option>
<option value="NT">Northwest Territories</option>
<option value="NS">Nova Scotia</option>
<option value="NU">Nunavut</option>
<option value="ON">Ontario</option>
<option value="PEI">PEI</option>
<option value="QC">Quebec</option>
<option value="SASK">Saskatchewan</option>
<option value="YK">Yukon</option>
</select>
In the above example, "California" and "New York" will appear in the drop-down choices, but the database values will be stored as "CA" and "NY", respectively.
If you want both the display (what the visitor sees) and the value (what you see in eTrigue), to be the same, then update each line like below:
<option value="Alabama">Alabama</option>
<option value="Alaska">Alaska</option>
... etc...
- Save your web page.
- The above steps can be applied to other fields as well. The difference is the values that are specified.
For example, let's suppose you wanted to update the Country (text) field as a picklist.
Find the line of code that references the country field:
<input type="text" name="x_country" value="" />
Then replace it with a listing of the countries:
<select name="x_country">
<option value="AF">Afghanistan</option>
<option value="AL">Albania</option>
... keep adding entries for the other countries ...
<option value="UK">United Kingdom</option>
<option value="US">United States</option>
</select>