Jump to content

Checkout page add new or remove field


cseamiya

Recommended Posts

4 hours ago, cseamiya said:

I want to remove the company details and street address 2 field from checkout page.

there are two real options here - edit the checkout.tpl template or use CSS code within templates/six (or custom)/css/custom.css to hide those elements.

if you were using Six/Standard Cart, I would suggest to edit the template as it will give a cleaner output - you'll have to repeat it after every WHMCS update though... you'll just need to remove the two divs below...

                        <div class="col-sm-12">
                            <div class="form-group prepend-icon">
                                <label for="inputCompanyName" class="field-icon">
                                    <i class="fas fa-building"></i>
                                </label>
                                <input type="text" name="companyname" id="inputCompanyName" class="field" placeholder="{$LANG.orderForm.companyName} ({$LANG.orderForm.optional})" value="{$clientsdetails.companyname}"{if $loggedin} readonly="readonly"{/if}>
                            </div>
                        </div>
                        <div class="col-sm-12">
                            <div class="form-group prepend-icon">
                                <label for="inputAddress2" class="field-icon">
                                    <i class="fas fa-map-marker-alt"></i>
                                </label>
                                <input type="text" name="address2" id="inputAddress2" class="field" placeholder="{$LANG.orderForm.streetAddress2}" value="{$clientsdetails.address2}"{if $loggedin} readonly="readonly"{/if}>
                            </div>
                        </div>

YdzBED6.jpg

using css would be a better solution - *IF* WHMCS had IDs on their divs.. but they rarely do. 🙄

without them, the best you can do is to hide the elements inside them... but that will leave spaces in the checkout form.

input#inputCompanyName.field,
input#inputAddress2.field
{ display: none;}

label[for="inputCompanyName"],
label[for="inputAddress2"]
{ display:none; }

fgHVtvE.jpg

if you have a custom orderform with correct IDs etc, then you could use custom.css and you shouldn't have to worry about WHMCS updates breaking them (unless WHMCS change the form).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated