Buy Now
Sign in

event switcher load external php file

pirosoft , January 29 2018, 09:38
P
pirosoft 6
January 29 2018, 09:38 #374824
Hi, i try to include external php file in event switcher, but don't go, is it possible?
GreyHead 64
January 29 2018, 15:00 #374832
Hi pirosoft ,

Which version of ChronoForms are you using? There should be no problem in including a PHP file in CFv5 - and I think that it is also possible in CFv6.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
V
vivora66 12
February 13 2019, 04:31 #383852
Hello, Im new in CF6, in CF5 the event switcher have a  code field, I dont see that code field in CF6 to inset custom PHP code for the event switcher
healyhatman 7
February 13 2019, 04:37 #383853
 1
 Answer
Have a PHP block BEFORE the event switcher that RETURNs the value you want. Then in the switcher, use
{var:phpblockname}
If you need the value to come from a script in an external PHP file, then just include it in the PHP block
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
V
vivora66 12
February 13 2019, 04:38 #383854
Thank you, I will try it
V
vivora66 12
February 13 2019, 05:29 #383855
Do I need put the <? ?> tags? because I have an error 500 when the form execute the PHP
healyhatman 7
February 13 2019, 05:38 #383856
Nit in the PHP block, but yes in your external file
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store