Form not working

mashdun 18 Mar, 2009
Ok. This is only my second form I have built through Dreamweaver, so forgive my ignorance.

I have a form that has Spry validation and has three file upload boxes. I am using an "Upload in Background" extension for Dreamweaver that begins uploading the file immediately. I'm not sure if I have something setup wrong with this or don't have chronoform setup correctly.

I have setup the email, email templates, uploaded the code, Set the Form tag attachment: enctype='multipart/form-data', and the file upload is set to Yes and looks like this: CoverPage:doc|docx{120-1},Manuscript:doc|docx{120-1},WhitePapers:doc|docx{120-1}

I have added var $mosconfig_fileperms = '0064'; to my configuration.php

The form shows up fine in my article. The Spry is working. The Upload in background is working. When I hit the submit, nothing happens. Just refreshes to a blank form.

Here is a link to the test site:

I don't have anything in the Form Javascript, not sure what I should put there. All the Javascript for the Spry and the Upload in background is in folders in the root of the test site.

Any suggestions to what I am doing wrong? Thanks.

GreyHead 18 Mar, 2009
Hi Mashdun,

The DreamWeaver/Spry code is adding form tags inside your form - for example:
<form id="form10" action="" method="post" name="form10">
<span id="sprycheckbox1">
<input id="Yes" type="checkbox" name="Yes"/>
<span class="checkboxRequiredMsg"/>
These tags will break ChronoForms which relies on adding its own form tags at the top and bottom of the form. I think I am right in saying that nested form tags are not allowed in html.

nml375 18 Mar, 2009
That is correct Bob. Although the HTML4/XHTML dtd does allow both block and script elements (which would include forms) within the form element, the form elements are explicitly prohibited. Nested forms are hence in violation of the dtd.
Although the terminating </form> is mandatory, some parsers will add the terminator upon encountering a new form element. Others will simply discard the form as invalid.
mashdun 19 Mar, 2009
Ok guys... Thanks for your help. I have it somewhat working now with two minor problems. The emails are working but missing the attachments.

1. The "Upload in Background" is working but the files won't attach to the email. I took the JS links out of the HTML code and the files will then attach to the email, but of course the "Upload in Background" script doesn't work. Right now, I have the "Upload in Background" links in the HTML.

The links are:
<script language='JavaScript' type='text/javascript' src=""></script>
<script language='JavaScript' type='text/javascript' src=""></script>
<script language='JavaScript' type='text/javascript' src=""></script>
<script language='JavaScript' type='text/javascript' src=""></script>
<link rel='stylesheet' type='text/css' href="" />

Here is the form:

I'm pretty sure it has something to do with me not putting anything in the "Form Javascript" code area, but not sure what it means to put "without opening and closing tags."

2. My other problem I noticed, when I removed the above links to the JS out of the HTML code, when the form emails both me and the recipient (the person who completed the form), it sends the attachments to both me and the user. Once I get the JS stuff worked out and it is attaching the attachments, I want it to only send the attachment to me and not to the person who fills out the form. Is that possible?

Thanks again.

nml375 19 Mar, 2009
JScript is perhaps not my primary language, sort of. But it would appear to me, that your BGUpload script uses a separate serverside script (JScript/fileHandle.php) to receive the file upload. As such, I'm not sure ChronoForms will have a shot at handling the file upload, and hence is unable to attach the uploaded file to the email.
mashdun 19 Mar, 2009
OK... I scratched the Upload in Background scripts.... The forms are working and sending attachments. Is there a way to not have the reply email that the user gets to not have the attachments?


GreyHead 19 Mar, 2009
Hi Mashdun,

Sorry, as far as I can see from the code, there is no way of treating the attachments differently using the built-in emails.

You would have to write a separate little emailer for the user in the OnSubmit box. This is straightforward to do, you need to setup the parameters for sendmail
$email_sent = JUtility::sendMail($from, $fromname, $recipients, $subject, $email_body, $mode, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );


PS FYI the background scripts now load 404 Errors which is a bit messy.
Max_admin 19 Mar, 2009
Hi Matt,

enabling/disabling the attachment per email is added to V3.1 RC3 which will be out at the weekend!

ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.