Announcement

Collapse
No announcement yet.

Changing installment periodicity dynamcially in the form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing installment periodicity dynamcially in the form

    I have a form, and depending on which UnitPrice1 radio button is selected, the installment and periodcity needs to change. That is, of the unitprice options, some of them are one-time purchase, and some of them are x amount a month for 12 months.

    Right now I've got the installment value set to one, and the periodicity set to monthly.

    I can use javascript so that if a pay per month option is selected, the installment value is changed to 12.

    I'm not really comfortable having the javascript add the hidden inputs for installment and periodicity- since the the user changes their mind and selects a different option, those values wouldn't get changed.

    Here's the question- if the installment value is one and the periodicity value is monthly- does this cause any problems for one-time transactions?

    for reference: https://savannastation.carolinatigerrescue.org/donate-BigCatDinnerClub.php

  • #2
    Good day!

    Installments cannot be set to 1 for the number of payments. The minimum it can be set to is 2 which makes logical sense for the feature.

    Experience shows that at times too much automation is not a good thing. Letting the patron choose may make it easier and less prone to error.

    Please let me know if I can be of any further assistance.
    Regards,
    Click & Pledge Support Department

    On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
    Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

    Comment


    • #3
      Resolution

      This is what I settled on as a solution, and it looks like it's working.

      I used the following hidden fields at the beginning of the form
      <input type="hidden" name="Installment" id="Installment" value=""/>
      <input type="hidden" name="Periodicity" id="Periodicity" value="Month" />

      For the options that are one-time payments, the input tag was like this (note the onclick event):
      <input type="radio" name="UnitPrice1" id="UnitPrice1" value="240" onclick="javascript:document.getElementById('Insta llment').value=''"/>

      for the options that are multiple payments:
      <input type="radio" name="UnitPrice1" id="UnitPrice1" value="20" onclick="javascript:document.getElementById('Insta llment').value='12'"/>

      This way, the default is no installments, so if javascript is disabled on the browser, they won't be overcharged. I can probably set something up to flag transactions with a multi payment option and without an installment value. If the user changes their mind (clicks on a multi-payment option and then changes it to a single payment option), the value gets set back to nothing.

      BTW, in the process, I discovered that if a transaction fails due to an invalid credit card (in this case I was one character short on the test credit card number)- there is no error returned to indicate that this is the problem.

      So there ya go!



      Originally posted by CarolinaTigerRescue View Post
      I have a form, and depending on which UnitPrice1 radio button is selected, the installment and periodcity needs to change. That is, of the unitprice options, some of them are one-time purchase, and some of them are x amount a month for 12 months.

      Right now I've got the installment value set to one, and the periodicity set to monthly.

      I can use javascript so that if a pay per month option is selected, the installment value is changed to 12.

      I'm not really comfortable having the javascript add the hidden inputs for installment and periodicity- since the the user changes their mind and selects a different option, those values wouldn't get changed.

      Here's the question- if the installment value is one and the periodicity value is monthly- does this cause any problems for one-time transactions?

      for reference: https://savannastation.carolinatigerrescue.org/donate-BigCatDinnerClub.php

      Comment

      Working...
      X