Records not being created in data base table

deborahSusan 28 Jul, 2008
Using Joomla 1.5 and the latest version of Chronoforms, I just can't determine why records are not being added to the data base table. Any ideas to resolve this?
Thx!
GreyHead 28 Jul, 2008
Hi deborahSusan,

Without more information all I can say is that 'something is wrong' - there are several things that it could be. Please take a backup copy of your form using the icon in the Forms Manager and post it here (as a zipped file) or email it to me at the address in my sig and I'll take a look.

Bob
deborahSusan 31 Jul, 2008
Thx, Bob!

I emailed the form to you, and I appreciate your guidance. The form sends the info to the email recepients with all of the data, as formatted in the email template that I created.

I use this same code in other J! sites but none that are 1.5. The only difference is that, in my many attempts to right the situation, I removed the onclick attribute from the submit button and left the "Form tag attachment" on the General tab in Forms Management blank.


I'm wondering if it's a setting somewhere that I need to change.

Thx again for your time ~ debi
GreyHead 31 Jul, 2008
Hi debi,

Ive got your form - I'll take a look first thing in the morning (it's midnight here now).

Bob
GreyHead 01 Aug, 2008
Hi debi,

Looked at the form this morning but there's only the Form HTML included - I need the rest of the form as well please.

[sendfb][/sendfb]

Are you using a ReDirect URL? If so then you may need to replace your chronocontact.php file as there is a bug in some versions.

Bob
deborahSusan 02 Aug, 2008
Your quick response has been truly amazing! I sincerely appreciate your help.

I am using a ReDirect URL, so I'll see if I can find another version of chronocontact.php, and I sent the content of the backup file in an email. I didn't see a link to directly upload the file.

Thx again!
GreyHead 02 Aug, 2008
Hi debi,

The form you sent looks like the standard test form. There is no autogenerated code in there - to save data in a table you need to click the 'Create data table' link in the Forms Manager. Or maybe you sent the wrong form by mistake.

My email address is info at greyhead.net - you can send an attachment there. (For some reason my sig isn't showing up here and I can't find the setting that's stopping it.)

Bob
deborahSusan 02 Aug, 2008
In the Chrono Forms - Forms Manager window, I have only one form, and in the data column it shows a link that says:

"Show saved Data"


When I click that link, it takes me to a window that has these columns, but there are no records although I have tested it by submitting the form a dozen times (and the data from each was sent to the email address that I indicated in the settings):

# Record id date - time

To verify the existence of the table, I went back to the Chrono Forms - Forms Manager window, selected the form by putting a check in the checkbox next the forms name, and then clicked the "Create table" button at the top of the window. The following message was displayed:

"A table has already been created for this form"

That's why I am so perplexed!

I'll send the backup file to your address via my regular email program. Thank you again for helping me solve this craziness!
GreyHead 02 Aug, 2008
Hi debi,

OK - the form saves data Ok for me but I've created a new table to do that. I think that the problem maybe that there is a mismatch between the table and the autogenerated code. You appear to have added the textarea fields to your form after the Autogenerated code was created - maybe this has something to do with it?

I suggest that you drop the table jos_chronoforms_1 from the database (back it up first if it has any useful data in it); then delete the code on the Autogenerated tab; save the corm and click Create table to make a new table. Hopefully the data will then save OK.

Bob

PS In the Special fields tab you have 'fromemail' in three places - which means that I get three emails after submitting the form (one is probably enough).
deborahSusan 02 Aug, 2008
I dropped the table jos_chronoforms_1 from the database (checked the database to make sure it was dropped).

Then I delete the code on the Autogenerated tab and saved the form.

I checked the checkbox next to the form's name and clicked the Create table button along the top of the page to make a new table

I checked the database to make sure it was created.

I filled out the form in entirety and submitted it.

I checked the "show data" option for the form and . . . NO records

I checked the database directly, and NO record.


I'm going through the entire process again . . . but using the Create table link in the form's "row" in the Chrono Forms - Forms Manager . . . perhaps it's the button's functionality.

Thank you for going above and beyond!

PS LOL yes, one is probably enough! I'll correct it!
deborahSusan 02 Aug, 2008
No luck again . . . I deleted my phpBB database too, and tried it again . . . still no luck.

Now I'm going to delete the form and start all over . . . :wink:
GreyHead 02 Aug, 2008
Hi debi,

Please copy the content of the Autogenererated code tab and post it here or send it to me, I'll add some debug code to it for you to try.

We have once had a problem like this before that was tracked down to an obscure character encoding bug in MySQL :-(

Bob
deborahSusan 02 Aug, 2008
I deleted the form and went through the entire process . . . still no luck . . . getting some sleep and will tackle it again in the AM !

oooh, just say your note . . . thx for sticking with me!

this is for the new form I created . . . i only made minor adjustments to the form from before (name, etc.)
markj72000 06 Aug, 2008
I'm having the exact same problem with a new form that i created. I have an old form that submits to the database just fine but from the beginning the only way i could get the old form to submit was to do all the table drops and recreate the Auto Generated Code and all that, even when there was no data to re import i had to do these steps. None of this gets the new form working and I've even compared the to auto generated codes to see if there were any large differences but i just don't see any other than the new fields i added.

This is the auto generated code from my new form that will not save to the database..

<?php
$database =& JFactory::getDBO();
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16);

$database->setQuery( "INSERT INTO #__chronoforms_11 VALUES (
'' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".JRequest::getVar('url','', 'post', 'string', '' )."' , '".JRequest::getVar('fname','', 'post', 'string', '' )."' , '".JRequest::getVar('lname','', 'post', 'string', '' )."' , '".JRequest::getVar('email1','', 'post', 'string', '' )."' , '".JRequest::getVar('email2','', 'post', 'string', '' )."' , '".JRequest::getVar('street','', 'post', 'string', '' )."' , '".JRequest::getVar('city','', 'post', 'string', '' )."' , '".JRequest::getVar('state','', 'post', 'string', '' )."' , '".JRequest::getVar('zip','', 'post', 'string', '' )."' , '".JRequest::getVar('gold_gym','', 'post', 'string', '' )."' , '".JRequest::getVar('radio','', 'post', 'string', '' )."' , '".JRequest::getVar('tv_ad','', 'post', 'string', '' )."' , '".JRequest::getVar('movie_theater','', 'post', 'string', '' )."' , '".JRequest::getVar('referral','', 'post', 'string', '' )."' , '".JRequest::getVar('paper_ad','', 'post', 'string', '' )."' , '".JRequest::getVar('mega_truck','', 'post', 'string', '' )."' , '".JRequest::getVar('search_engine','', 'post', 'string', '' )."' , '".JRequest::getVar('other1','', 'post', 'string', '' )."' , '".JRequest::getVar('countertop','', 'post', 'string', '' )."' , '".JRequest::getVar('cabinets','', 'post', 'string', '' )."' , '".JRequest::getVar('faucets','', 'post', 'string', '' )."' , '".JRequest::getVar('flooring','', 'post', 'string', '' )."' , '".JRequest::getVar('sinks','', 'post', 'string', '' )."' , '".JRequest::getVar('appliances','', 'post', 'string', '' )."' , '".JRequest::getVar('other2','', 'post', 'string', '' )."' , '".JRequest::getVar('info','', 'post', 'string', '' )."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>



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