Home › Forums › Quform WordPress › using: add_action('iphorm_post_process_12', 'my_save_form_data');
- This topic has 12 replies, 2 voices, and was last updated 9 years ago by
kendavies.
- AuthorPosts
- April 1, 2016 at 10:12 am #18576
kendavies
ParticipantHi. 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?
April 1, 2016 at 10:37 am #18577Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 1, 2016 at 12:49 pm #18582kendavies
ParticipantThanks for the brilliant speedy reply, worked perfectly. Outstanding support as always.
April 1, 2016 at 1:01 pm #18583kendavies
ParticipantOh, 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
April 5, 2016 at 10:30 am #18606Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 5, 2016 at 1:23 pm #18613kendavies
ParticipantThis 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) “” }’
April 5, 2016 at 1:24 pm #18614kendavies
ParticipantSo it looks like it’s pulled the prices through, just not displayed them
April 5, 2016 at 6:07 pm #18623Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 5, 2016 at 6:31 pm #18626kendavies
ParticipantSorry 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
April 5, 2016 at 6:35 pm #18627Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 5, 2016 at 7:23 pm #18629kendavies
ParticipantWe are pulling in two figures, one on 16_8 and one on from 16_15. Would I just replicate that for the other field?
April 5, 2016 at 8:10 pm #18630Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 7, 2016 at 9:23 am #18642kendavies
ParticipantHi Ally
Works perfectly, thanks for you help
Ken
- AuthorPosts
- You must be logged in to reply to this topic.