Forums

Saving data to database

lcwakeman 03 May, 2011
I am using Chrono Forms V3.2.0. I have created a form to register new members. I am using another Joomla component to handle memberships so the database exists. It is created as follows:

CREATE TABLE IF NOT EXISTS `kc_nokcm_persons` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`salutation` varchar(25) DEFAULT NULL,
`firstname` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
`middlename` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`nickname` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '',
`birthday` date DEFAULT NULL,
`address` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`city` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`zip` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`country` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`state` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`telephone` varchar(25) DEFAULT NULL,
`mobile` varchar(25) DEFAULT NULL,
`url` varchar(250) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`description` text,
`image` varchar(250) DEFAULT NULL,
`createdby` varchar(50) DEFAULT NULL,
`createddate` datetime DEFAULT NULL,
`modifiedby` varchar(50) DEFAULT NULL,
`modifieddate` datetime DEFAULT NULL,
`custom1` varchar(255) DEFAULT NULL,
`custom2` varchar(255) DEFAULT NULL,
`custom3` varchar(255) DEFAULT NULL,
`custom4` varchar(255) DEFAULT NULL,
`custom5` varchar(255) DEFAULT NULL,
`birthname` varchar(50) DEFAULT NULL,
`deceased` date DEFAULT NULL,
`hh_person_id` int(11) unsigned DEFAULT NULL,
`hh_salutation_override` varchar(50) DEFAULT NULL,
`hh_name_override` varchar(255) DEFAULT NULL,
`_import_id` int(11) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

I have attached a backup of the form. The debug is showing no errors but the data doesn't get loaded.
lcwakeman 03 May, 2011
BTW, INSERT INTO `kc_nokcm_persons` (`id`) VALUES (null); inserts a record full of null values so I am not failing a not null constraint.
GreyHead 03 May, 2011
Hi lcwakeman,

There's no backup attached.

At a guess the problem may be with the name of the _import_id column.

Bob
lcwakeman 04 May, 2011
Sorry about that, Chief.

I get the error The extension cfbak is not allowed. I will try and zip it.

Ah, better.
GreyHead 09 May, 2011
Hi lcwakeman,

It appears to work OK here. I switched the DB Connection back to the default After Email though. The Before Email Options don't run unless 'Send Emails' is set to 'Yes' on the form General tab.

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