Announcement

Collapse
No announcement yet.

Solution to avoid re-entering form data if server returns an error?

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

  • Solution to avoid re-entering form data if server returns an error?

    I've created a form similar to FaaS Example 2 (simple radio button form), and it seems to work great so far. My concern is with error handling.

    I know that I can install client-side validation to ensure that all required fields are filled before the user can submit the form. But if the submission generates a server-side error (say, due to an incorrect credit card number), it seems thatonly the error comes back (via OnErrorUrl) and the user has to re-enter all of the form fields. So I'm looking for a way to help the user by re-populating the field data they already entered.

    Is there any way to accomplish this with FaaS? A way to post via AJAX, perhaps? Or a way for C&P to attach a long query string to the OnErrorUrl (that contains all the field info the user entered)?

    Thanks!

  • #2
    Good day!

    Unfortunately at this time the system does not post back the answers or what is posted to it.

    This is in the feature lists to be added to the next release of FaaS but currently there is no ETA. I will discuss this with the developers and let you know.
    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
      Thanks for the prompt response. Just to be certain: it seems that what I want to achieve (saving the user from having to re-enter the entire form after a server-side error) would be possible with PaaS, correct? I'm not sure I want to go that route (due to minimal experience w/ web services), but I want to best advise my client. Thanks in advance for your reply.

      Comment


      • #4
        Good day Mike,

        Please see the following release note:

        http://forums.clickandpledge.com/showthread.php?648-FaaS-Release-1-29-Introducing-Postback-response-method-Post-or-Get&p=1904#post1904

        With the addition of Postback method to the FaaS forms the system will post back all posted information back to the response pages. Using a dynamic page you may simply get all the posted data back and show them as the default values of the form fields.

        Please note that the following information will NOT post back due to security reasons:
        • Credit card number
        • CV2

        We hope this feature will help you with accomplishing what you were trying to do.

        Post back to this thread and let us know how it works out.
        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


        • #5
          Thanks for implementing FaaS postback (onError). It works great, and is a huge usability improvement.

          I really appreciate your responsiveness.

          Comment


          • #6
            Originally posted by Mike Hondel View Post
            Thanks for implementing FaaS postback (onError). It works great, and is a huge usability improvement.

            I really appreciate your responsiveness.

            Yes, I think it's a very common use-case when people choose FaaS, they will have a form page in their site which directly post user inputted data to Click&Pledge service; so when FaaS post back to the service response page, it's very important it send back all those user inputted data.

            I just noticed one small problem:

            When FaaS post back all the user inputted fields, seems RefID was duplicated ( other variables are fine) , I printed all the POST variables in my OnSuccessful page:

            keyn val:12422204154644111
            key:vg val:7cfd74ea-366a-4f84-ae08-f668418d6b3a
            key:au val:dc260f
            key:gn val:1701cedd-0d01-40fb-b4b3-3b54be004d5e
            key:RefID val:xx.xx.xx.162-1335141682-fc8129eddd9c7116904d32abba0618e1,xx.xx.xx.162-1335141682-fc8129eddd9c7116904d32abba0618e1
            ...

            Comment


            • #7
              Good day!

              Please post the form URL here so we can review your form. I just want to make sure you don't have 2 nodes called RefID.
              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


              • #8
                Originally posted by Support.Department View Post
                Good day!

                Please post the form URL here so we can review your form. I just want to make sure you don't have 2 nodes called RefID.


                try this one : http://therealnews.com/t1/t1.php



                the return.php code:
                <?
                function PrintPost()
                {
                foreach ( $_POST as $key=>$value)
                {
                print "key:$key val:$value<br>";
                }
                }


                PrintPost();
                ?>

                Comment


                • #9
                  Good day!

                  We found the issue and have fixed it with the latest release:

                  see: http://forums.clickandpledge.com/showthread.php?661-Release-1-29-001-Fixing-a-post-back-bug&p=1944#post1944

                  Thank you for pointing it out and sorry for the inconvenience.

                  Please let us know if we 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

                  Working...
                  X