Forums

Email Template with Country/State Select Javascript

marcodeluca 20 Oct, 2010
Hi there:)

How would I get the email template to post results for Country and State select fields when I am using a javascript to auto-populate the State list?

The Form Code looks like this:

<div class="form_item">
  <div class="form_element cf_dropdown">
    <label class="cf_label" style="width: 150px;">Country</label>
    <select id='countrySelect' name='country' onchange='populateState()' class="cf_inputbox">
    </select>
    
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_dropdown">
    <label class="cf_label" style="width: 150px;">Prov/State</label>
    <select id='stateSelect' name='state' class="cf_inputbox">
    </select>
  <script type="text/javascript">initCountry('CA'); </script>
    
  </div>
  <div class="cfclear"> </div>
</div>


So i tried {select_stateSelect} and {select_countrySelect) in the email template, but it just printed the field names between curly brackets. Do I need to use PHP to print the recorded State / Country?

Thanks in advance!

Marco
GreyHead 20 Oct, 2010
Hi marcodeluca,

the two input names are 'country' and 'state' so {country} and {state} should work.

Bob
marcodeluca 20 Oct, 2010
grumble grumble...It's almost always a simple type or silly user error. Thanks for being my proof-reader mang!

marco
This topic is locked and no more replies can be posted.