Forums

Chronoform within K2 item using plugin fails to DB Save

petersen 03 Feb, 2012
I've got a Chronoform displaying in a K2 item. The form displays correctly, and will attempt to send an email, but when I add a DBSave action, the form fails:

The form is at http://petersen.petersenuploads.co.uk/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=20&Itemid=102

Error log (when run locally)

[03-Feb-2012 10:14:52] PHP Warning: Invalid argument supplied for foreach() in C:\wamp\www\petersenwebsite\libraries\joomla\database\database\mysql.php on line 684

[03-Feb-2012 10:14:52] PHP Notice: Undefined index: pet_chronoforms_data_pre-vacancy in C:\wamp\www\petersenwebsite\administrator\components\com_chronoforms\form_actions\db_save\db_save.php on line 40

[03-Feb-2012 10:14:52] PHP Warning: Invalid argument supplied for foreach() in C:\wamp\www\petersenwebsite\administrator\components\com_chronoforms\form_actions\db_save\db_save.php on line 46

[03-Feb-2012 10:14:52] PHP Parse error: syntax error, unexpected '-', expecting '{' in C:\wamp\www\petersenwebsite\administrator\components\com_chronoforms\form_actions\db_save\db_save.php(62) : eval()'d code on line 3

[03-Feb-2012 10:14:52] PHP Fatal error: Call to a member function bind() on a non-object in C:\wamp\www\petersenwebsite\administrator\components\com_chronoforms\form_actions\db_save\db_save.php on line 85

Any ideas?
petersen 03 Feb, 2012
hmmm Looks like this might be an issue with a '-' in the formname (and hence the database table).

Bob can you confirm?
GreyHead 03 Feb, 2012
Hi Petersen,

That's almost certainly the problem - see "unexpected '-'" in the error messages.

Do you have control over the table name or is this a K2 table?

I think that is because there is an unquoted table name call somewhere in the ChronoForms or Joomla! code but I've never tried to hunt it down. If I recall correctly, in PHPMyAdmin SELECT * from jos_table-name fails but SELECT * from `jos_table-name` is OK.

Bob
petersen 03 Feb, 2012
Yeah, that's the cause. Removed the '-' and it works fine now.

Thanks
uday.dahale 03 Jul, 2012
Hello bob,


can I call chronoform in k2 item

how????


Please help...... :? :? :?
GreyHead 03 Jul, 2012
Hi uday.dahale,

Sorry, I don't know how petersen got that part to work

Bob
petersen 03 Jul, 2012
Hi,

I just put the Chrono plugin in the K2 Item content:

{chronoforms}YOUR_FORM_IN_HERE{/chronoforms} and make sure that K2 allows plugins to run
uday.dahale 03 Jul, 2012
thx....for reply....
but need chronoform plugin ?

chronocontact

regards,

uday
petersen 03 Jul, 2012
Yeah sorry, that's the old version 3. New version 4 is chronoform.
This topic is locked and no more replies can be posted.