The site runs on Nginx with Tomcat and Nginx has the geoip module enabled. So I can get the country of the visitor as cgi variable in CFWheels. Now I have a select list of countries with value equals to a two character iso-countrycoded. I would like it to be set to the country detected.
#select(objectName="user", id="country", property="country", options=countrylist)#
#errorMessageOn(objectName="user", property="country")#
What I would like to have if let's say the countrycode from the cgi variable is AQ that Antartica is set default.
<select id="country" name="user[country]">
<option value="AF">Afghanistan</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ" selected>Antarctica</option>
<option value="AG">Antigua and Barbuda</option>
<option value="AR">Argentina</option>
<option value="AM">Armenia</option>
...
</select>