Removing Country on Signup

Discussion in 'Customization & add-ons' started by susan_el, Apr 14, 2009.

  1. susan_el

    susan_el Guest

    All my signups are from the United States. I tried to remove the country line but I'm still getting a "required." What are all the pieces I need to remove to not have this field?
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Try adding this to the signup.html form
    <input type="hidden" name="country" value="US" />

    David
  3. susan_el

    susan_el Guest

    Thanks for your help.

    Adding the line you suggest doesn't seem to address the problem although I may be misunderstanding how to enter it. Just a reminder: The Country dropdown choice then triggers the dropdown for the States to show. I need to figure out how to get the dropdown list for all the U.S. States without forcing the customer to select the United States previously.

    Here is the coding for Country and State fields:
    <tr>
    <th><b><label for="country">#_TPL_SIGNUP_COUNTRY#{$a_req}</label></b><br />
    <div class="small"></div></th>
    <td><select name="country" id="f_country" size="1" >
    {country_options selected=$smarty.request.country}
    </select>
    </td>
    </tr>
    <tr>
    <th><b><label for="state">#_TPL_SIGNUP_STATE#{$a_req}</label></b><br />
    <div class="small"></div></th>
    <td>
    <input type="text" name="state" id="t_state" size="30"
    {if $config.use_address_info eq '1'}_required="1" realname="State"
    {else}_required="0"{/if}
    value="{$smarty.request.state|escape}"
    {if count($state_options)>1}disabled="true" style='display: none;' {/if}
    />
    <=1}disabled="true" style='display: none;'{/if}
    >
    {html_options options=$state_options selected=$smarty.request.state}
    <select name="state" id="f_state" size="1"
    {if $config.use_address_info eq '1'}_required="1" realname="State"{/if}
    {if count($state_options)<=1}disabled="true" style='display: none;'{/if}
    >
    {html_options options=$state_options selected=$smarty.request.state}
    </select>
    </td>
    </tr>
  4. everbatim

    everbatim aMember Pro Customer

    Joined:
    Dec 19, 2007
    Messages:
    65
    Have you tried replacing this entire section:

    Code:
    <th><b><label for="country">#_TPL_SIGNUP_COUNTRY#{$a_req}</label></b><br />
    <div class="small"></div></th> 
    <td><select name="country" id="f_country" size="1" >
    {country_options selected=$smarty.request.country}
    </select>
    </td>
    </tr>
    <tr>
    <th><b><label for="state">#_TPL_SIGNUP_STATE#{$a_req}</label></b><br />
    <div class="small"></div></th>
    
    with this:

    Code:
    <input type="hidden" name="country" value="United States" />
    
    What that should do is remove the country selection all togther and allow aMember to pull the States from the "United States" call list as if it were really there.
  5. susan_el

    susan_el Guest

    Still couldn't get the State dropdown from the script to work. I just decided to not use the country/state script. I used the hidden type for the country field as you both suggested and substituted the State and Country rows with this row. Everything worked fine:

    Code:
    <tr>
        <th><input type="hidden" name="country" value="United States" /><b><label for="state">#_TPL_SIGNUP_STATE#{$a_req}</label></b><br />
        <div class="small"></div></th>
        <td>
      
       <select name="state" size="1" id="t_state" {if $config.use_address_info eq '1'}_required="1" realname="State"
            {else}_required="0"{/if}
            value="{$smarty.request.state|escape}"
            {if count($state_options)>1}disabled="true" style='display: none;' {/if}>
    	<option value="AL">Alabama</option>
    	<option value="AK">Alaska</option>
    	<option value="AZ">Arizona</option>
    	<option value="AR">Arkansas</option>
    	<option value="CA">California</option>
    	<option value="CO">Colorado</option>
    	<option value="CT">Connecticut</option>
    	<option value="DE">Delaware</option>
    	<option value="DC">Dist of Columbia</option>
    	<option value="FL">Florida</option>
    	<option value="GA">Georgia</option>
    	<option value="HI">Hawaii</option>
    	<option value="ID">Idaho</option>
    	<option value="IL">Illinois</option>
    	<option value="IN">Indiana</option>
    	<option value="IA">Iowa</option>
    	<option value="KS">Kansas</option>
    	<option value="KY">Kentucky</option>
    	<option value="LA">Louisiana</option>
    	<option value="ME">Maine</option>
    	<option value="MD">Maryland</option>
    	<option value="MA">Massachusetts</option>
    	<option value="MI">Michigan</option>
    	<option value="MN">Minnesota</option>
    	<option value="MS">Mississippi</option>
    	<option value="MO">Missouri</option>
    	<option value="MT">Montana</option>
    	<option value="NE">Nebraska</option>
    	<option value="NV">Nevada</option>
    	<option value="NH">New Hampshire</option>
    	<option value="NJ">New Jersey</option>
    	<option value="NM">New Mexico</option>
    	<option value="NY">New York</option>
    	<option value="NC">North Carolina</option>
    	<option value="ND">North Dakota</option>
    	<option value="OH">Ohio</option>
    	<option value="OK">Oklahoma</option>
    	<option value="OR">Oregon</option>
    	<option value="PA">Pennsylvania</option>
    	<option value="RI">Rhode Island</option>
    	<option value="SC">South Carolina</option>
    	<option value="SD">South Dakota</option>
    	<option value="TN">Tennessee</option>
    	<option value="TX">Texas</option>
    	<option value="UT">Utah</option>
    	<option value="VT">Vermont</option>
    	<option value="VA">Virginia</option>
    	<option value="WA">Washington</option>
    	<option value="WV">West Virginia</option>
    	<option value="WI">Wisconsin</option>
    	<option value="WY">Wyoming</option>
    </select>
    
    
        </td>
    </tr>

Share This Page