Forums

Sending email but not recorded in DB

amheng5 18 Apr, 2010
Hi, I've worked with your component and works great on the many forms I've completed. I'm completely stumped on my last form I created that now has an upload file feature (which I didn't have in my other forms). I have another form on this web site that works perfectly.

I've set up like usual and have run a test form submission. I receive the emails and I see the uploaded file when I see via Ftp. But when I try to view via the DB under Chronocontact and via my web hosting SQL Panel. but no records appear. Please advise if I'm doing something wrong now that I'm using an upload file field. I've made sure the upload file is writeable.

Also as a side question, is it possible to show the ui_id field on the sent email messages.

Here's my url link to my form in question.
http://www.westfieldband.org/index.php?option=com_chronocontact&chronoformname=scholarshipform

Thanks
GreyHead 18 Apr, 2010
Hi amheng5,

I don't know of any reason why having an uploaded file field would stop the DB Connection from working. I suggest that you double-check the DB Connection settings and if they are Ok then turn on Site Debug and look for the MySQL statement to see if there is anything obviously wrong with it.

I don't know what the ui_id field is - it doesn't seem to be an input from your form?

Bob
nml375 18 Apr, 2010
Hi,
As far as I can see, there's one form field name with a dash in it, that's usually a bad idea. If your database table has a corresponding table field (with a dash in the name), the DB Connection code will break. There is additionally one field with a space in the name, which also will break the code.

The fields I found were "District-Regional" and "Parent Signature".
You'll have to change these names in your form code, email templates, and database table(s). Once changed, you'll also have to remove, and then re-apply the DB Connection settings for CF to "refresh" it's view of the table structure.

/Fredrik
GreyHead 18 Apr, 2010
Hi Fredrik,

Nice catch - I missed those :-(

Bob
amheng5 18 Apr, 2010
Ok, I'll check on this...didn't catch the typos you pointed out. I'll keep you posted. Thx!

PS. Perfect. the typos in my fields is what must have prevented data from being stored. Thanks for pointing this out.

One last question. Is there a way when an email is sent that the uploaded file can be attached to the message rather than having to download the file via ftp? I can't seem to find the settings to allow this other than the email setting where it says "Enable attachments". I have two messages going out after a form is submitted; one to webmaster and one to submitter email. Hope this makes sense. Thanks again.
GreyHead 18 Apr, 2010
Hi amheng5,

If you set Enable Attachments to 'Yes' on an Email Setup then the uploaded file should be attached.

Bob
amheng5 18 Apr, 2010
Ok I went in and cleared out extra coding in the file upload tab on the form and all is well in the land of forms. Thanks

===========
I got this resolved, I think. Not sure what I did but was tweaking the upload field. On one form I'm still getting the following warning:
Warning! - Failed to move file.

I've made sure the permissions are set to 777.

Thanks

=========================
I indicated earlier that this option to "enable attachments" was set to yes. Is there only specific file extensions allowed for upload? I've tried to search the forum and doesn't seem to have any file type limitations. I'm stumped on the file attachment, the final piece of my puzzle. thanks

OK this is the debug output, hope this helps in resolving my problem:

# $_FILES Array: Array ( [LOREssayAttachment] => Array ( [name] => Test essay.doc [type] => application/vnd.ms-word [tmp_name] => /tmp/phpnzQ6Fs [error] => 0 [size] => 27136 ) )
# Upload routine started for file upload by : LOREssayAttachment
# /hermes/bosweb/web207/b2071/ipw.westfieldband/public_html/components/com_chronocontact/uploads/scholarshipform/20100418170309_Testessay.doc has been uploaded OK
GreyHead 19 Apr, 2010
Hi amheng5,

Excellent, good to hear that.

Bob
This topic is locked and no more replies can be posted.