CName Posted May 19, 2015 Share Posted May 19, 2015 請問如何將 "姓氏"跟"名字"這兩個欄位合併成一個"姓名"欄位 另外送貨地址的部分,如何取消*必要欄位 Link to comment Share on other sites More sharing options...
21846657 Posted May 21, 2015 Share Posted May 21, 2015 在这里进行修改:LOCALIZATION / COUNTRIES / Edit: (Your target country) Link to comment Share on other sites More sharing options...
hijacky88 Posted August 16, 2016 Share Posted August 16, 2016 我看了一下程式碼輸出 姓氏 及 姓名 的方法,發現皆為 {$address['firstname']} {$address['lastname']} 我猜測應該無法透過設定的方式來修改輸出格式 因此我用了一個在註冊頁面中做弊的方式: 1.我先註解輸入姓氏的欄位,讓它不會出現在註冊頁面上,目的是為了讓使用者只輸入姓名firstname就好 <!-- <div class="required form-group"> <label for="customer_lastname">{l s='Last name'} <sup>*</sup></label> <input onkeyup="$('#lastname').val(this.value);" type="text" class="is_required validate form-control" data-validate="isName" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.customer_lastname)}{$smarty.post.customer_lastname}{/if}" /> </div> --> 2.拉出原本輸入姓氏欄位的程式碼,進行修改 <input onkeyup="$('#lastname').val(this.value);" type="text" class="is_required validate form-control" data-validate="isName" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.customer_lastname)}{$smarty.post.customer_lastname}{/if}" /> 3.刪除註冊頁面檢查必填欄位的程式碼,並讓value塞入空白值,目的是為了傳到PHP驗證時可以通過檢查。 <input onkeyup="$('#lastname').val(this.value);" type="hidden" class="is_required validate form-control" data-validate="isName" id="customer_lastname" name="customer_lastname" value=" " /> 以上方法或許不是最好,但會是解決這問題的方案之一 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now