Hello everybody,
I have a form with page switch like in FAQ
https://www.chronoengine.com/faqs/70-cfv5/5255-how-can-i-switch-form-pages-in-cfv5.html
I have a custom code that write fields on database in the on_submit
when I press CONTINUE I go to page_2 where there is another custom code that shall write again to database. ( On page_2 inside event switcher)
this code is not written, I suppose wants to write the first code on_submit.
QUESTION:
is there a possibility inside a custom code or php to say sometthing like:
If you are on first page write this otherwise write that.
Thanks
I have a form with page switch like in FAQ
https://www.chronoengine.com/faqs/70-cfv5/5255-how-can-i-switch-form-pages-in-cfv5.html
I have a custom code that write fields on database in the on_submit
when I press CONTINUE I go to page_2 where there is another custom code that shall write again to database. ( On page_2 inside event switcher)
this code is not written, I suppose wants to write the first code on_submit.
QUESTION:
is there a possibility inside a custom code or php to say sometthing like:
If you are on first page write this otherwise write that.
Thanks
Hi vismay,
Pages are events, so you can check the event name:
Best regards,
Max
Pages are events, so you can check the event name:
<?php
if($form->data['event'] == 'first'){
//code
}
Best regards,
Max
I don't really mannage, because I'm using an eventi switch ( see attachment)
When I submit the first page (on load) I go to on submit, where I have the eventi switch.
From there I see the URL &event=submit, not page_2
When I submit the first page (on load) I go to on submit, where I have the eventi switch.
From there I see the URL &event=submit, not page_2
Hi vismay,
You may also set page 1 to submit to a new event named "switch", and add the event switcher there, then make page2 and 3 submit to "submit".
Best regards,
Max
You may also set page 1 to submit to a new event named "switch", and add the event switcher there, then make page2 and 3 submit to "submit".
Best regards,
Max
This topic is locked and no more replies can be posted.