我正在尝试将输入到字段street address
、city
、state
、zipcode
中的值,然后使用这些值填充longitude
和的隐藏字段latitude
。
我正在尝试做的一个例子可以在这里看到,我只是想用多个输入字段来做。
inside{...}
用于value=" "
CMS 表达式引擎,因此可以忽略
表单域:
<div class="formsection clearfix">
<label for="trainer_address">Street Address</label>
<span class="directions">This will NOT be displayed in your listing. Only for search Purposes.</span>
<input type="text" name="trainer_address" id="trainer_address" value="{trainer_address}">
</div>
<div class="formsection clearfix">
<label for="trainer_city">City</label>
<span class="directions">The city to be displayed in your listing.</span>
<input type="text" name="trainer_city" id="trainer_city" value="{trainer_city}">
</div>
<div class="formsection clearfix">
<label for="trainer_state">State</label>
<span class="directions">The state to be displayed in your listing.</span>
<select name="trainer_state">
{options:trainer_state}
<option value="{option_value}"{selected}>{option_name}</option>
{/options:trainer_state}
</select>
</div>
<div class="formsection clearfix">
<label for="trainer_zip">Zip Code</label>
<span class="directions">The zip code to be displayed in your listing.</span>
<input type="text" name="trainer_zip" id="trainer_zip" value="{trainer_zip}">
</div>
以下是隐藏的纬度和经度字段:
<input type="hidden" id="trainer_longitude" name="trainer_longitude" value="{trainer_longitude}" />
<input type="hidden" id="trainer_latitude" name="trainer_latitude" value="{trainer_latitude}" />