• Resolved billgates107

    (@billgates107)


    Hi, I used the premium version of your plugin on my client’s website product page.

    The form is very long and my client asks me that after users have validated their form and have been redirected to the cart page, they should be able to modify their order by going back to the product page and retrieve the data the sent earlier.

    When I go back to the product page, the information is missing and the form that were shown by conditional values are hidden.

    Is there a way to retrieve all the form data after leaving the page ?
    Thank you.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Sorry as of now there is no option to retain the data on the product page after adding it to cart. And you can’t see the selected options and data after returning to the product page from cart. It can’t be done.

    Thank you.

    Thread Starter billgates107

    (@billgates107)

    Thank you for your fast answer.

    I understand I can’t do it by default. But I can code.
    What would be the best approach to achieve the result I want ?

    I did something similar because I wanted the customer to make changes later. I used Javascript and PHP.
    1. I generated a random ID for the customer and addet it to the product url (https://url.com?id=kbw2P)
    2. Hide the default cart button and add another one.
    3. When the user clicks your add to cart button, get all the values of the fields (also true or false for checkbockes/radio…) and send an ajax request containing all of your form data to a custom PHP Script.
    4. Write the data to a database.
    4.1 Be careful here. You don’t have the security features of WordPress if you do it this way. So you should be prepared for any kind of attack. I suggest making a new database just for this data and adding various safety features. If you store personal data you should be even more careful!
    5. When you get a success from the server, click the hidden “real” add to cart button
    6. Now you can write some code to detect the GET data in the URL (https://url.com?id=kbw2P). Now request the data from the database using the id. You can either hardcode a function which puts the data into the fields (which I did) or find a better solution (store the field names in the database too)

    You can add the URL with the ID to the history, add an “EDIT”-Button to the Cart containing a link, or E-Mail the Edit link to the customer. This is up to you, some of these options are more difficult than others but they are possible.

    Hope this helps, have a nice day!

    • This reply was modified 4 years, 7 months ago by koljaa. Reason: forgot 5
    Thread Starter billgates107

    (@billgates107)

    Thank you for your answer. I’m gonna take the time to analyse it and see what I can do.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Retrieve the form values’ is closed to new replies.