Jump to content
Sign in to follow this  
JelleG

Checkout custom field, required when paymentmethod selected

Recommended Posts

Hi,

 

I created a custom field, that I only want to display when a payment method is selected.

That works fine with the following code. But I set the input fields a required in the admin panel.

But it should only be required when the payment method is selected.

 

How can I modify this, so that it only become required when selected?

 

HTML:

 

<div id="ccinputform" class="iban-number" {if $selectedgatewaytype neq "banktransfer"} style="display:none;"{/if}>

{foreach key=num item=customfield from=$customfields}

<div class="row">

<div class="col-md-12">

<div class="form-group form-group-xl">

<label class="control-label" for="customfield{$customfield.id}">{$customfield.name}</label>

{$customfield.input|replace:'>' : 'placeholder="IBAN nummer" class="form-control" >'}

<span id="helpBlock" class="help-block"></span>

</div>

</div>

</div>

{/foreach}

</div>

Share this post


Link to post
Share on other sites

it is possible in client area but a little tricky, you may post screenshot for these custom fields as it displayed in cart?

 

and what cart template is in use?

Share this post


Link to post
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.

Sign in to follow this  

  • Similar Content

    • By xnetco
      Hello.
      We've recently moved to Stripe and it's working very well for existing recurring card payments. However existing store credit cards don't appear on the checkout page. Do you know if it's possible to add them or migrate them all over to Stripe?
      Tim 
       
       
    • By ShaneP
      Hi All 
      I tried to purchase a hosting package on mt whmcs and when i click the checkout button after filling out my details this error comes up. I have also checked with my payment gateway provider and they say it is whmcs problem. The site which i am referring to is https://skyehost.co.za/client/ I have also attached the error message below.
       
      If the community could be so kind to help me with this problem.
      Thanks
      Shane

    • By Web Host Pro
      We have two credit card processors. One is only for existing customers and one is for new sign ups. I was wondering if we could disable a processor just in the public checkout, but still have it for existing customers that have a product.
      Basically disable a processor in the main checkout, then have it when adding products after the customer has a product.
    • By Web Host Pro
      I normally use Automatically take the user to the invoice, just wondering  which is more common and maybe some feedback on why.
    • By Connection
      Hello,
      I am looking for someone to develop a custom Paygate Checkout System
      Similar to Paygate or 2checkout 
      Does anyone know the correct person who can help me with this? 
      Regards,
       
  • 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