Hi guys,
I'm trying to solve a big problem testing a simple form, in order to understand the behaviour of event switcher.
I've followed the FAQ of event switcher here:
https://www.chronoengine.com/faqs/70-cfv5/5255-how-can-i-switch-form-pages-in-cfv5.html
Its' working.
For example, I need to write something when I submit page_2 and something else when I'm in page_3.
page_1 is the first choice, so nothing should be written.
page_2 write something like "ok this is from page 2"
page_3 write something like "ok this is from page 3"
But actually happens something like this:
When I submit page_1 it writes the code of page_2 and when I submit from page_2 to page_3 it writes the code of page_3
So, basically BEFORE I fire the desire custom code.
Any idea?
Just for information the custom code is something like this:
I'm trying to solve a big problem testing a simple form, in order to understand the behaviour of event switcher.
I've followed the FAQ of event switcher here:
https://www.chronoengine.com/faqs/70-cfv5/5255-how-can-i-switch-form-pages-in-cfv5.html
Its' working.
For example, I need to write something when I submit page_2 and something else when I'm in page_3.
page_1 is the first choice, so nothing should be written.
page_2 write something like "ok this is from page 2"
page_3 write something like "ok this is from page 3"
But actually happens something like this:
When I submit page_1 it writes the code of page_2 and when I submit from page_2 to page_3 it writes the code of page_3
So, basically BEFORE I fire the desire custom code.
Any idea?
Just for information the custom code is something like this:
<?php
$campo='2';
$db =& JFactory::getDBO();
$query = "INSERT INTO `prova` (
campo
)
VALUES (('$campo')
);";
$db->setQuery($query);
$db->query();
?>