using: add_action('iphorm_post_process_12', 'my_save_form_data');

Home Forums Quform WordPress using: add_action('iphorm_post_process_12', 'my_save_form_data');

This topic is: resolved
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #18576
    kendavies
    Participant

    Hi. We are using this php action to successfully pull the data from a submitted form on to the redirect page that uses a newly created template. We have put the code in a plug-in as advised and it’s all great. We have just tried to send another form to a different re-direct page with another new template in the same site and created a new plug-in to pass the data, but it won’t let us activate the plug-in as we are already using: ‘my_save_form_data’); in the pervious plug-in. Is there a way around this?

    #18577
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18582
    kendavies
    Participant

    Thanks for the brilliant speedy reply, worked perfectly. Outstanding support as always.

    #18583
    kendavies
    Participant

    Oh, spoke too soon. That let me activate the plugin but function isn’t working.

    This is my plug in for a form id of 16:

    ‘<?php

    /*
    * Plugin Name: quform-passdata-anonymous
    * Description: Custom code for quform.
    * Version: 1.0
    */

    // Paste in your custom code below

    function my_save_form_data_16($form)
    {
    session_start();
    $_SESSION[‘iphorm_16’] = $form->getValues();
    }
    add_action(‘iphorm_post_process_16’, ‘my_save_form_data_16’);

    Ive looked at the code in my template landing page to see if I need to change a reference in there but can’t see anything that relates to my_save_form_data.

    Ive also looked at the javascript inside the form creating the calculation and it’s all set to form id 16 too

    #18606
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18613
    kendavies
    Participant

    This is what it displayed after adding that string of code.

    ‘array(12) { [“iphorm_16_13”]=> NULL [“iphorm_16_11”]=> NULL [“iphorm_16_1”]=> string(7) “25 sqft” [“iphorm_16_2”]=> string(17) “Less than a month” [“iphorm_16_5”]=> string(19) “As soon as possible” [“iphorm_16_12”]=> NULL [“iphorm_16_14”]=> NULL [“iphorm_16_4”]=> NULL [“iphorm_16_16”]=> NULL [“iphorm_16_8”]=> string(7) “£17.94” [“iphorm_16_15”]=> string(7) “£11.40” [“iphorm_16_0”]=> string(0) “” }’

    #18614
    kendavies
    Participant

    So it looks like it’s pulled the prices through, just not displayed them

    #18623
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18626
    kendavies
    Participant

    Sorry to be a pain Ally, but where does that line of code go? In the re-direct template page or in the plug-in or somewhere else?

    Ken

    #18627
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18629
    kendavies
    Participant

    We are pulling in two figures, one on 16_8 and one on from 16_15. Would I just replicate that for the other field?

    #18630
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18642
    kendavies
    Participant

    Hi Ally

    Works perfectly, thanks for you help

    Ken

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy