• Resolved wilfried1954

    (@wilfried1954)


    Hello,

    Is it possible to generate a cookie so that some fields are filled in as it was in a previous session? In the documentation are some explanation about cookies but it is not clear to me. If this is possible, a brief example should be welcome.

    Thanks, Wilfried

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

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @wilfried1954,

    If you want generate cookies with the values submitted by the from, they should be created by yourself.

    For example, if you are using the Developer or Platinum versions of the plugin, the code into the “cp_calculatedfieldsf_insert_in_database.php” file is evaluated every time the form is submitted, so, in this file you can include your code to generate the cookies (the $params array includes all submitted fields), and then, into the webpage where the form is inserted, you should include the shortcodes to generate javascript variables from cookies:

    https://cff.dwbooster.com/documentation#javascript-variables

    and a javascript block to populate the form with the values of these variables:

    https://cff.dwbooster.com/documentation#populate-form

    An alternative would be enabling the “Users Permissions” add-on (distributed with the Developer and Platinum versions of the plugin) and configure the form as follows:

    – Be accessible only by registered users.
    – Be submitted only one time per user.
    – Enable the permissions for edition.

    Now, when the user visit the form, its fields would be pre-filled with the information submitted previously by itself:

    https://cff.dwbooster.com/add-ons/users-permissions

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘cookies’ is closed to new replies.