I don’t have time right now I have to go work a 12 hour shift, but would you test this fix?
Let me know as soon as possible if it works.
Edit the si-contact-form.php
Just after
FSCF_Util::setup();
add this code:
if (!class_exists('siContactForm')) {
class siContactForm {
function si_contact_form_short_code($atts) {
// backwards compatibility with manual PHP call from 3.xx
FSCF_Display::process_short_code($atts);
}
}
}
$si_contact_form = new siContactForm();
Also because you are using the ’email_to’ attribute…
You have to go to the Tools tab for the Form 2 and check the setting
“Enable PHP sessions.”
If you don’t “Enable PHP sessions.”, the ’email_to’ attribute will be ignored.
Enables PHP session handling. Default is not enabled. You can enable this setting to use PHP sessions for shortcode attributes and the CAPTCHA. PHP Sessions must be supported by your web host or there may be session errors. This setting affects all forms.
Thread Starter
pmdf
(@pmdf)
Thanks for getting back on this Mike.
Adding that code results in isset($si-contact-form) returning true now, but the form still isn’t displayed and there’s no error message either. I have php sessions enabled.
The “do_shortcode” format works fine, but I don’t know how to pass an ’email_to’ attribute that way, if that’s even possible. [edit – just found the tip on adding this attribute using the shortcode, so that should work as a fix for me].
The code I posted was close, it was missing a echo command.
Fixed in 4.0.9
(02 Oct 2013) – Bug fix: PHP method of calling form display was not working.
– Bug fix: time validation did not work on 24 hour format.
This version is compatible with either method.
Thread Starter
pmdf
(@pmdf)
Yep, the echo has fixed it for me too. Many thanks for the fix.