Hi all,
I used variable data via curly brackets directly in my query. But after copying the form to a new setup with Joomla 2.5.9 and CF4.0RC3.5.2 the value didn't com through and the queries were unsuccessfull.
Placing a simple $someid = $form->data['someid'] before the old curly bracket location and using a variable instead did the trick for me.
Is it true that curly brackets can not be used in queries anymore?
Cheers,
Rolf
I used variable data via curly brackets directly in my query. But after copying the form to a new setup with Joomla 2.5.9 and CF4.0RC3.5.2 the value didn't com through and the queries were unsuccessfull.
Placing a simple $someid = $form->data['someid'] before the old curly bracket location and using a variable instead did the trick for me.
Is it true that curly brackets can not be used in queries anymore?
Cheers,
Rolf
Hi Rolf,
You've never reliably been able to use curly brackets inside PHP (though it does work in some places).
I follow a rule of thumb to always use $form->data['input_name'] in PHP and keep {input_name} for use in plain HTML.
Bob
You've never reliably been able to use curly brackets inside PHP (though it does work in some places).
I follow a rule of thumb to always use $form->data['input_name'] in PHP and keep {input_name} for use in plain HTML.
Bob
Thanks for the quick reply Bob, I changed all those curlies!
But the cause of all this is still unsolved by me. I had a Custom Code action in the On Load before DB Loader and Show html.
But that now gives me a "Catchable fatal error: Object of class CFChronoForm could not be converted to string"
When I add the form id like this:
The error is gone and I can request the value by $form->data['formidname']['id_user'] offcourse. But I also had a hidden field for Javascript use, but this field remains empty now!
Is form->data not usable anymore? (with Joomla 2.5.9 php 5.3.10 and Magic Quotes off)
But the cause of all this is still unsolved by me. I had a Custom Code action in the On Load before DB Loader and Show html.
<?php
$user = JFactory::getUser();
$form->data['id_user'] = $user->id;
?>But that now gives me a "Catchable fatal error: Object of class CFChronoForm could not be converted to string"
When I add the form id like this:
<?php
$user = JFactory::getUser();
$form->data['formidname']['id_user'] = $user->id;
?>The error is gone and I can request the value by $form->data['formidname']['id_user'] offcourse. But I also had a hidden field for Javascript use, but this field remains empty now!
Is form->data not usable anymore? (with Joomla 2.5.9 php 5.3.10 and Magic Quotes off)
Hi Rolfo,
What is the full text of the error message?
I use $form->data[] all the time with no problems/.
Bob
What is the full text of the error message?
I use $form->data[] all the time with no problems/.
Bob
Complete error message on a white page:
Catchable fatal error: Object of class CFChronoForm could not be converted to string in /home/filemaker/domains/xxxxxxxxxxxx/public_html/administrator/components/com_chronoforms/form_actions/custom_code/custom_code.php(19) : eval()'d code on line 3
This topic is locked and no more replies can be posted.
