Forums

Can't change form names

aimfeld 27 Sep, 2010
Dear ChronoForms expert,

After upgrading the chronoforms component to 3.1 RC5.5, my forms didn't work properly anymore. Turns out that the dashes in my form names now cause problems. Therefore, I tried to remove the dashes in the form names. But when I want to save the changes, I get the following error messages and the changes are not stored:

Warning: require_once(/var/www/vhosts/diacova.ch/httpdocs/administrator/components/com_chronocontact/includes/fuehrungserfolg/formhtml.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/diacova.ch/httpdocs/administrator/components/com_chronocontact/admin.chronocontact.php(2736) : eval()'d code on line 2

Fatal error: require_once() [function.require]: Failed opening required '/var/www/vhosts/diacova.ch/httpdocs/administrator/components/com_chronocontact/includes/fuehrungserfolg/formhtml.php' (include_path='.:') in /var/www/vhosts/diacova.ch/httpdocs/administrator/components/com_chronocontact/admin.chronocontact.php(2736) : eval()'d code on line 2


In order to remove the dashes, I had to edit the mysql database. After that, my forms worked again. Is there a way to make saving changes work properly again?

Thanks, Adrian
GreyHead 27 Sep, 2010
Hi Adrian,

There's a 'feature/quirk' in the latest release that tries to evaluate the Form HTML when you save the form. This fails when there is PHP in the Form HTML. The workaround is to add a check before any PHP in the Form HTML
<?php
if ( !$mainframe->isSite() ) { return; }
// PHP continues here
?>


You need to refresh the DB Connection after any changes to database column names. In the Form Editor click the DB Connection tab and set the Connection to 'No'. Click the 'Apply icon in the toolbar to save the form, open the DB Connection tab, set the Connection back to 'Yes' and re-save the form. This will refresh the copy of the table information that ChronoForms uses.

Bob
aimfeld 27 Sep, 2010
Hi Bob,

Thanks a lot for your quick reply, your workaround did the job.

You need to refresh the DB Connection after any changes to database column names. In the Form Editor click the DB Connection tab and set the Connection to 'No'. Click the 'Apply icon in the toolbar to save the form, open the DB Connection tab, set the Connection back to 'Yes' and re-save the form. This will refresh the copy of the table information that ChronoForms uses.



The connection was already set to "No" before, so I didn't change anything there.

Cheers, Adrian
This topic is locked and no more replies can be posted.