[ic] checkout.html default to country

Blair Campbell interchange-users@icdevgroup.org
Wed Jan 22 20:30:01 2003



> Hi List,
>
> Where would I go to change the country default to Canada instead of US on
> the checkout.html page?
>
> Thanks
>
> Blair
>

I sent this earlier and have now made changes to the checkout.html file

I have changed the code in checkout.html as shown below but I get Country as
Canada and States as Alabama,......

I can't see what I am doing wrong?

<td class="contentbar1" align=right>[error name=state
std_label="State/Province" required=1]</td>
     <td align="left" class="contentbar1">
       [loop search="
  fi=state.txt
  sf=country
  se=[default country CA]
  rf=state,name,country
  tf=sorder,name
  ml=100
       "
       option=state]
       [on-match]<SELECT onChange="check_tax(this.form)"
NAME=state>[/on-match]
       [list]
       [loop-change 1][condition][loop-param country][/condition]
       <OPTGROUP LABEL="[data table=country col=name key='[loop-param
country]']">
       [/loop-change 1]
       <OPTION VALUE="[loop-code]">[loop-pos 1]
       [/list]
       [on-match]</SELECT>[/on-match]
       [no-match]<INPUT NAME=state VALUE="[value state]" SIZE=20>[/no-match]
       [/loop]
     </td>
     <td class="contentbar1">&nbsp;</td>
     <td class="contentbar1">&nbsp;</td>
   </tr>
   <tr>
     <td align="right" class="contentbar1">
       [error name=zip std_label="Zip/Postal Code" required=1]
     </td>
     <td class="contentbar1">
       <INPUT TYPE=text NAME=zip VALUE="[value name=zip filter=word]"
size="10" maxlength="10">
     </td>
     <td class="contentbar1">&nbsp;</td>
     <td class="contentbar1">&nbsp;</td>
   </tr>
   <tr>
     <td align="right" class="contentbar1">
       [error name=email std_label="Email Address" required=1]
     </td>
     <td class="contentbar1">
       <INPUT TYPE=text NAME=email VALUE="[value email]" size="30">
     </td>
     <td class="contentbar1">&nbsp;</td>
     <td class="contentbar1">&nbsp;</td>
   </tr>
   <tr>
     <td align="right" class="contentbar1">
       Country
     </td>
     <td colspan="3" class="contentbar1">
       [if value country =~ /(^$|CA|US)/]
       <SELECT NAME=country onChange="this.form.submit()">
              <OPTION [selected country CA] VALUE="CA"> Canada

       <OPTION  VALUE="US"> United States

       <OPTION VALUE="JP"> Other
       </SELECT>
       [else]
       <SELECT onChange="this.form.submit()" NAME=country>
       [loop option=country search="
  ra=yes
  fi=country
  st=db
  rf=code,name
  ml=1000
  tf=name
       "]
       <OPTION VALUE="[loop-code]"> [loop-data country name]
       [/loop]
       </SELECT>
       [/else]
       [/if]
       <small>(will update display)</small>
     </td>
   </tr>