Incorrect Donation Amounts with Punctuation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PilgrimAfrica
    Junior Member
    • Jan 2015
    • 6

    Incorrect Donation Amounts with Punctuation

    Hello. Has any other user experienced this problem using the FaaS for donation pages?

    We have a FaaS donation form with a variety of donation amounts that a user can select via radio button:

    - $5,000
    - $1,000
    - $500
    - $250
    - $100
    - $50
    -$25
    - Other _____

    Donations are being processed in the incorrect amount when a user selects the "Other" box and inputs a donation amount using punctuation. If a donor uses
    5000

    the amount processes fine. However, all of these cases fail:
    $5,000 is processed as $0
    $5000 is processed as $0
    $5,000.00 is processed as $0

    and:

    5,000 is processed as $5
    5,000.00 is processed as $5

    So using "$" and "," breaks the form.

    The code for the "Other" field is:

    <input type="radio" name="UnitPrice" id="Unitprice" value="Other" />
    <input type="text" name="Other" size="12" maxlength="30" onKeyUp="document.getElementById('Unitprice').chec ked = true;" onFocus="document.getElementById('Unitprice').chec ked = true;">


    What is going on here?

    S
  • CnP.Support
    C&P Support
    • May 2000
    • 8144

    #2
    Good day!

    The issue you are having is the delimiter. Please note that the system is used by clients around the world and anywhere else in the world comma is a decimal separator and period is thousand separator. It is not possible to have a system that can identify the system of separator the end user is used to.

    In our system we block comma as a value to be entered and only allow numbers to be added and show example of a number as e.g. 1000.00

    In FaaS there is a node:



    The Decimal Mark may be set for your site as US or ISO. Examples are offered so you may choose what works with your end users.

    I hope that answers your question.

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

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

    Comment

    • PilgrimAfrica
      Junior Member
      • Jan 2015
      • 6

      #3
      Hi there. Thanks for the response about the DecimalMark. My code, however, has already included:

      <input name="DecimalMark" type="hidden" id="DecimalMark" value="US" />

      and it is not working.

      The specific text field donors are filling out is:

      <input type="radio" name="UnitPrice" id="Unitprice" value="Other" />

      <input type="text" name="Other" size="12" maxlength="30" onKeyUp="document.getElementById('Unitprice').chec ked = true;" onFocus=
      "document.getElementById('Unitprice').checked = true;">

      I had decent html/css skills, but am not a programmer and unsure if my code is correct.

      I want to standardize on the US version of DecimalMark. What am I missing? Thanks.

      Comment

      • CnP.Support
        C&P Support
        • May 2000
        • 8144

        #4
        Good day!

        Can you copy your form to another page and place it in TEST mode so we can test.

        What you have is correct and should treat comma as thousand separator. Once we have your form in TEST mode or a link to it we can take the code and review it.
        Regards,
        Click & Pledge Support Department

        Join us @ the educational webinars: https://clickandpledge.com/webinars/
        Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

        Comment

        • PilgrimAfrica
          Junior Member
          • Jan 2015
          • 6

          #5
          Hi there,

          I have placed the form in TEST mode here:



          Thank you for reviewing it.

          Sean

          Comment

          • CnP.Support
            C&P Support
            • May 2000
            • 8144

            #6
            Great!

            Now please change this line:

            <form id="Donation" method="post" action="https://faas.cloud.clickandpledge.com">

            to:

            <form id="Donation" method="post" action="https://verify.faas.cloud.clickandpledge.com">

            With Verify we can see what is being posted raw without it being processed.

            Please let us know when done.
            Regards,
            Click & Pledge Support Department

            Join us @ the educational webinars: https://clickandpledge.com/webinars/
            Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

            Comment

            • PilgrimAfrica
              Junior Member
              • Jan 2015
              • 6

              #7
              I have changed the post action link. Done.

              Comment

              • PilgrimAfrica
                Junior Member
                • Jan 2015
                • 6

                #8
                Sorry, but there was an FTP error and the wrong file was uploaded. I fixed the issue and the right file has been uploaded with

                <form id="Donation" method="post" action="https://verify.faas.cloud.clickandpledge.com">

                Thanks.

                Comment

                • CnP.Support
                  C&P Support
                  • May 2000
                  • 8144

                  #9
                  Good day!

                  I reviewed your code and made a change to the items being posted.

                  Please see: http://secureform.cloud.clickandpled...rimafrica.html

                  Test it and see if it does what you want it to do.

                  BTW: This is posting to our test account and NOT your account.
                  Regards,
                  Click & Pledge Support Department

                  Join us @ the educational webinars: https://clickandpledge.com/webinars/
                  Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

                  Comment

                  • PilgrimAfrica
                    Junior Member
                    • Jan 2015
                    • 6

                    #10
                    Hello,

                    Thank you! I have taken your code, stripped out the values and added our account info back in, and it seems to be working perfectly now.

                    For future reference sake, what is the change that you made?

                    Grateful,

                    Sean

                    Comment

                    • CnP.Support
                      C&P Support
                      • May 2000
                      • 8144

                      #11
                      Good day!

                      I changed your UnitPrice, etc. to UnitPrice1, etc. - this creates a family so if you decide to add a second set it will be set to UnitPrice2, etc.

                      You also had a Javascript on the OTHER field which I could not figure out what it does and I removed it. It could be that your JS was the problem.

                      Other than that nothing else was done.

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

                      Join us @ the educational webinars: https://clickandpledge.com/webinars/
                      Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

                      Comment

                      Working...