I have today created a new form for my website and have found a small problem with it. It was one of two forms that i have created and strangely this particular form of the two behaves unexpectedly.
On visiting the page in the website where the form is supposed to be i get a blank page that only consists of the following source code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>I have found a workaround to this by setting the "Enable Data Storage" setting on the "DB Connection" tab to NO.
Unfortunately this disables the display, and storage, of the tables data.
It is possibly something to do with my setup of the form but im at a bit of a loss as to what might be causing it.
I have attached a copy of the backup file that chronoforms allows you to create. I hope that is will contain the necessary information that will help solve this issue.
Any assistance would be appreicated.
Best Regards,
Andrew
Which Chronoforms version do you have installed ? can you paste me your form HTML code here to look at ?
Regards
Max
Sorry i forgot to mention that, Chronoforms 3.0 stable running on joomla 1.5.7, although that is now 1.5.8, problem occured on both.
my form HTML:
<table style="text-align: left; width: 620px; height: 192px;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 342px; vertical-align: top;">Thank
you for your interest in our site.<br>
<br>
Please fill in the form below so that we can <br>
answer your enquiry:</td>
<td style="width: 241px;"><span
style="font-weight: bold;">A Company Name</span>.,<br>
Address1,<br>
Address2,<br>
Address3,<br>
Address4.<br>
Postcode<br>
<br>
Tel: +44 (1111) 111111<br>
Fax: +44 (1111) 111111</td>
</tr>
</tbody>
</table>
<br>
<small>(Items in <span style="font-weight: bold;">bold</span>
are required fields)</small><br>
<table>
<tbody>
<tr>
<td><span style="font-weight: bold;">First Name</span>:</td>
<td><input name="firstname"></td>
<td><span style="font-weight: bold;">Surname</span>:</td>
<td><input name="surname"></td>
</tr>
<tr>
<td>Company:</td>
<td><input name="company"></td>
<td></td>
</tr>
<tr>
<td><span style="font-weight: bold;">Address</span>:</td>
<td><textarea cols="30" rows="5"
name="address"></textarea><br>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td><span style="font-weight: bold;">Postcode</span>:</td>
<td><input name="postcode"></td>
<td>Fax:</td>
<td><input name="fax"></td>
</tr>
<tr>
<td><span style="font-weight: bold;">Tel</span>:</td>
<td><input name="tel"></td>
<td>Mobile:</td>
<td><input name="mobile"></td>
</tr>
<tr>
<td><span style="font-weight: bold;">e-mail</span>:</td>
<td><input name="email"><br>
</td>
<td><span style="font-weight: bold;">Confirm
e-mail</span>:</td>
<td><input name="email2" autocomplete="off"></td>
</tr>
</tbody>
</table>
<br>
If you do <span style="font-weight: bold;">not</span>
wish to receive updates about our website and products by email
un-tick this box: <input
checked="checked" name="email=yes" type="checkbox"><br>
Click <a href="http://www.oursite.co.uk/privacy-policy.html">here</a>
to view our privacy policy.<br>
<br>
<span style="font-weight: bold;">Please provide
information regarding your enquiry
below:</span><br>
<textarea cols="72" rows="5" name="details"></textarea>
<br>
<br>
For security purposes please enter the dark text in the image in the
box below before pressing submit:
<br>
{imageverification}
<br>
<br>
<input value="Submit" title="Submit" name="submit"
type="submit"><input title="Clear Form"
name="Clear Form" value="clearform" type="reset"><br>
<br>
This is the same code that i was using on the previous version, 2.5 RC3.1, i upgraded to version 3.0 stable, reloaded the information and found this problem.
Regards,
Andrew
Have found some errors appering in the webserver error log:
PHP Notice: Undefined property: stdClass::$plugins in /var/www/vhosts/oursite.co.uk/httpdocs/administrator/components/com_chronocontact/admin.chronocontact.html.php on line 2058, referer: http://www.oursite.co.uk/administrator/index.php?option=com_chronocontact
PHP Notice: Undefined property: stdClass::$plugins in /var/www/vhosts/oursite.co.uk/httpdocs/administrator/components/com_chronocontact/admin.chronocontact.html.php on line 2065, referer: http://www.oursite.co.uk/administrator/index.php?option=com_chronocontact
PHP Notice: Undefined property: stdClass::$plugins in /var/www/vhosts/oursite.co.uk/httpdocs/components/com_chronocontact/chronocontact.html.php on line 302
PHP Notice: Undefined property: stdClass::$mplugins_order in /var/www/vhosts/oursite.co.uk/httpdocs/administrator/components/com_chronocontact/admin.chronocontact.html.php on line 2047, referer: http://www.oursite.co.uk/administrator/index.php?option=com_chronocontact
PHP Notice: Undefined variable: paramsvalues in /var/www/vhosts/oursite.co.uk/httpdocs/administrator/components/com_chronocontact/admin.chronocontact.php on line 342, referer: http://www.siteour.co.uk/administrator/index2.php
PHP Notice: Trying to get property of non-object in /var/www/vhosts/oursite.co.uk/httpdocs/administrator/components/com_chronocontact/admin.chronocontact.php on line 342, referer: http://www.oursite.co.uk/administrator/index2.php
PHP Fatal error: Cannot redeclare Tablechronoforms_email_enquiry::$email in /var/www/vhosts/oursite.co.uk/httpdocs/components/com_chronocontact/chronocontact.php(41) : eval()'d code on line 18, referer: http://www.oursite.co.uk/index.php?option=com_content&view=article&id=47
Best Regards,
Andrew
The last 'Fatal Error' is the problem. I think that the variable is being declared twice - do you have more than one ChronoForm form on this page?
On that code line ChronoForms is trying to load the DB Connection info for your form and appears to be failing with a duplicate 'email' entry - does that help?
Bob
I only have the one form on the page, it is a page that is from the main menu in joomla built using the chronocontact page type, with the form name as the "target".
The form is built to only send the information to one email address. Could it be causing the problem if i have a field in my form called email? although having said that the other form that i have assembled works fine and that also has a field called email.
Regards,
Andrew
what are the 2 forms names ? can you go over all your form code, remove any spaces in any field name, and add type="text" for all fields tags missing the type attribute ? then after this create a new table for your form and connect t it and ignore the current one! (I guess you are connected to some table at the moment to save results!)
Regards
Max
Max gave me a better clue to go back and look at your code. There are quite a lot of attributes missing :-( Specifically this will give you a problem:
<input checked="checked" name="email=yes" type="checkbox">That name is invalid - equals signs are not permitted in field names.Bob
Thank you for that pointer changing the input name from "email=yes" to "emailsallowed" did the trick. I should have realised that. 😶
[You mention that there are quite alot of attributes missing in my code, is it possible to point me in the right direction? I'm very new to writing code like this.]
ignore this line, i didn't notice Max's earlier post until after i posted this one, i've added the Type attribute as Max said.
Also, a question about the email sending side of the component. Dynamic fields, e.g dynamic to field, how would i go about using this, a small example would be great.
Please thank Max for pointing things in the right direction on this.
Best Regards,
Andrew
a dynamic field will hold the field name which will hold some email parameter, like a dynamic TO to hold the field name of the form's field which may contain an email address at teh submit and so the email will be sent their too!
e.g: your form has a field called "write_your_email_here" then add this to the "Dynamic TO" and your email will be sent to the user as well!
Regards
Max
