I've been searching but haven't found a solution for this. I'm not very familiar with coding, especially when it comes to javascript. I'm hoping someone can assist me. I want to retrieve the user's geoip city and then insert it into a form as a value. Here's the script I currently have for fetching the geoip city...
<script src="http://j.maxmind.com/app/geoip.js"></script>
<script type="text/javascript">document.write(geoip_city());</script>
My goal is to place that city inside the value attribute of the form
Any suggestions on how I can achieve this?
The form structure is as follows...
<input type="hidden" name="custom_City" id="city" value="NEED CITY IN HERE"></input>