Earth Posted September 3, 2015 Share Posted September 3, 2015 (edited) Hello, I'm trying to remove some fields from the registration field however the method post here: http://wiki.whmcs.com/Order_Form_Templates does not work. I've edited everything to "hidden" and change all the values to "NA" but they still show up when trying to checkout. As seen here: puu.sh/jYjam/a5e6dfe5f0.png It looks like this hasn't been updated to work with v6 so I'm wondering if anyone can help me. By default most of the client's profile fields are required on the order form, it is possible via the Setup > General Settings > Other tab > Optional Client Profile Fields option to make certain fields optional. If you want to remove one of the default fields on your order form entirerly, you can change the field type to hidden and supply a default value of NA. The following example shows to to hide the Address 2 field from the viewcart.tpl page: Find: <input type="text" name="address2" style="width:80%;" value="{$clientsdetails.address2}" /> Replace with: <input type="hidden" name="address2" style="width:80%;" value="NA" /> Edited September 3, 2015 by Infopro Please Attach Images to Your Posts. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 3, 2015 Share Posted September 3, 2015 have you tried modifying the viewcart.tpl template and rem'ing out the entire section (label and input field) for the field(s) you want to remove? e.g., <!-- <label for="address1" class="control-label">{$LANG.clientareaaddress1}</label> <input type="text" name="address1" id="address1" value="{$clientsdetails.address1}" class="form-control"{if !in_array('address1', $clientsProfileOptionalFields)} required{/if} /> --> for an optional field, a template edit should be sufficient; if it's a required field, you should first make it optional via Setup > General Settings > Other tab - otherwise the order wouldn't progress until the field was completed (and if you're removed it, that may prove difficult!) I think the only true required field is the email address, everything else is (or can be set to) optional. 0 Quote Link to comment Share on other sites More sharing options...
Earth Posted September 4, 2015 Author Share Posted September 4, 2015 Okay so I was able to hide the fields however the titles for said fields are still being shown which is extremely hideous. Is there anyway to hide the titles as well? Can I completely remove these lines in the viewcart file and make sure they're optional so it won't hold up registration? Or will this completely break check out? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 4, 2015 Share Posted September 4, 2015 each of these fields will be mentioned twice in the template, so you may have to remove both instances - the code above should have removed the titles too - if it didn't, you must be seeing the other mention of them and so that would need to be rem'd out too. if they're optional, you can completely remove them if you wish - but remember that (unless you rename the order-form template folder), it might get updated during a WHMCS upgrade.... rem'ing them out gives you the option of putting them back at a later date, and also knowing which fields have been removed. checkout will only break is you remove something essential and/or required to the process - without knowing exactly what fields you want to remove it's hard to advise, but perhaps the best advice is to remove one field at a time and test. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.