Appnitro Software Forums » MachForm

Removal of Country

(5 posts)

  1. I did a search for this prior to posting. Is this what I need to remove to not have country show up?

    //create country markup, if no default value, provide a blank option
    if(empty($element->default_value)){
    $country_markup = '<option value="" selected="selected"></option>'."\n";
    }else{
    $country_markup = '';
    }

    foreach ($country as $data){
    if($data['value'] == $element->default_value){
    $selected = 'selected="selected"';
    }else{
    $selected = '';
    }

    Posted 1 year ago #
  2. Around line 1437 of your view-functions.php file, search for this code:

    <div id="li_{$element->id}_div_6" class="right">
      <select class="element select medium" id="element_{$element->id}_6" name="element_{$element->id}_6">
    	{$country_markup}
      </select>
      <label for="element_{$element->id}_6">{$lang['address_country']}</label>
    </div>

    simply remove that block of code.

    Anyway, you can also set the default value of this country list, so you don't have to remove it. This way, the country dropdown will be pre-selected to the default country.

    Posted 1 year ago #
  3. Yuniar, how can you set the default value for the country list?

    Posted 1 year ago #
  4. When you edit your form, click your address field.
    At the right tab, your field property, simply set the Default Country dropdown.

    Posted 1 year ago #
  5. thank you.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.