WHMCS从结帐页面中删除“国家/地区”选择器

问题描述 投票:0回答:1

我正在进行WHMCS自定义,并希望隐藏国家选择器字段。我试图从模板注释计数,并且没有显示字段,但是当尝试结帐时,我收到此错误:

Please correct the following errors before continuing:
Please choose your country from the drop down box

enter image description here

这是处理该部分的模板中的代码:

<div class="col-sm-12">
                        <div class="form-group prepend-icon">
                            <label for="inputCountry" class="field-icon" id="inputCountryIcon">
                                <i class="fa fa-globe"></i>
                            </label>
                            <select name="country" id="inputCountry" class="field"{if $loggedin} disabled="disabled"{/if}>
                                {foreach $countries as $countrycode => $countrylabel}
                                    <option value="{$countrycode}"{if (!$country && $countrycode == $defaultcountry) || $countrycode eq $country} selected{/if}>
                                        {$countrylabel}
                                    </option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

还有这一个:

<div class="col-sm-12">
                        <div class="form-group prepend-icon">
                            <select name="domaincontactcountry" id="inputDCCountry" class="field">
                                {foreach $countries as $countrycode => $countrylabel}
                                    <option value="{$countrycode}"{if (!$domaincontact.country && $countrycode == $defaultcountry) || $countrycode eq $domaincontact.country} selected{/if}>
                                        {$countrylabel}
                                    </option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>

所以我的问题是如何在没有警告的情况下进行结账?

field checkout whmcs whmcs-invoice-template
1个回答
0
投票

对于每个国家/地区div添加style =“display:none”,例如:

这将隐藏div但将保留默认国家/地区选择。

© www.soinside.com 2019 - 2024. All rights reserved.