I need to pass some data between forms. I've searched this forum but can't find what I'm looking for. I really don't know PHP so I may be searching for the wrong key words.
Here is the situation. I have a form currently saving data to a table. This is working well. I want to pass some of that data to another form for display and further processing. I'm using a redirect URL to go to the second page but I can't figure out how to pull the data from text fields or whatever and pass them. I also don't know how to pull them off the url on the second page if I go get them passed.
Would it be better to pull the data out of a table using the profile plugin? If so, how do I get the unique key from the insert on the first page to pass it to the second page.
I'm new to Chronoforms and PHP so detailed instructions would be helpful.
Hi bbriggstkd,
If this really is a two-page form then it sounds like a case for the multi-page plugin which will handle most of this for you,
Bob
I had looked at that too but it seemed like the multi-page form was for when you were collecting infomration on several pages. I'm collecting all the information on 1 page, then on the second I'm displaying it and allowing them to choose if they want to go to PayPal from there or pay by some other method. The amount owed is calculated so that is one of the items I need to pass just incase they go on to PayPal and I can't hard code the amount. Is that appropriate for a multipage form? I have the multi-page instructions from another post bookmarked but haven't had time to study it yet.
Thank you very much for your prompt reply.
Hi bbriggstkd,
Yes, a 'form' doesn't need to have any inputs on it - though in fact yours will have the payment choice selector.
That's how I would do it anyhow, probably I'd build a PayPal button on the second page including the amount.
Bob
I have spent hours looking through the forums but I can't find an answer.
I have 2 forms. The first one saves data to a table and sends an email. This thing works fine when I run it by itself.
The second page doesn't do anything right now, I'm just trying to get to it first. Eventually, I'll echo some data fromt he first page.
I created a Mother page and set up the multi page plugin.
When I click submit I get this error.
Fatal error: Call to a member function bind() on a non-object in /home/content/t/u/m/tumaa/html/components/com_chronocontact/libraries/customcode.php(71) : eval()'d code on line 13
I've checked and don't have any "-" in field names. This blows up whether I have the mother form pointing to the table or not. I only need to save data after the first form though.
I finally was able to get this to work. I needed to turn on saving data in the mother form as well as the form I have doing the actually storing.
I was not able to get the
<?php
$session =& JFactory::getSession();
$posted = $session->get('chrono_formpages_data_mother', array(), md5('chrono'));
echo '<div>$posted: '.print_r($posted, true).'</div>';
?>
code to work as it was described but I was able to get access to my data with the $_POST array. It appears I can do that will all my data.
I tried passing the cf_id to the second form but that blew up when I tried to save it. I found the error in other posts but there was no solution. It looks like I can get around the multiple data rows though.
Hi bbriggstkd,
If I remember correctly the $posted array is set up for you by ChronoForms in the latest release of the plugin so the code snippet is no longer needed.
Bob
Hi efh68,
It's one of the packaged ChronoForms plug-ins. There's a list in the left hand column of the Form Manager page.
To configure a plug-in first check the box by the form name, then click the Plug-in name link to open the configuration dialogue. When that is done open the Form Editor by clicking the Form Name link and go to the Plug-ins tab to enable the plug-in (green bars are enabled).
Bob