Formalicious.field_value_err_save

Hi, trying to add a checkbox or radio button value causes this error message to appear: formalicious.field_value_err_save.

Modx error log displays the following error:

 Error 22007 executing statement:
    INSERT INTO `modx_formalicious_answers` (`field_id`, `name`, `rank`, `published`, `selected`, `subfield_id`) VALUES (43, 'box1', 0, 1, 0, 0)
    Array
    (
    [0] => 22007
    [1] => 1366
    [2] => Incorrect integer value: '' for column `webtbglarus_`.`modx_formalicious_answers`.`subfield_id` at row 1
    )

This only seems to happen when adding a value to a checkbox or radio button. other field types don’t seem to cause the error.

Is there a work-around or solution to this problem?

Thank you in advance.

I’m actually looking into this for another client, but I honestly have no idea yet what’s causing that. The error message itself shows the value being passed is a zero… so how that somehow turns into an empty string? I’m kinda baffled by that error message.

It also works fine On My Machine™ to make debugging it even more fun. :wink:

Ive got the same error today with 2.0.3. I reinstall and found an error in the log, but installing was sucessful. The problem was the default value. I changed the SQL to the following, no it works.

   `CREATE TABLE `neukieritzsch_formalicious_forms` (`id` INT(11) NOT NULL AUTO_INCREMENT, `category_id` INT(10) NOT NULL DEFAULT '0', `name` VARCHAR(255) NOT NULL DEFAULT '', `published` TINYINT(1) NOT NULL DEFAULT '0', `published_from` TIMESTAMP, `published_till` TIMESTAMP, `saveform` TINYINT(1) unsigned NOT NULL DEFAULT '0', `redirectto` INT(10) unsigned NOT NULL DEFAULT '0', `email` TINYINT(1) unsigned NOT NULL DEFAULT '0', `emailto` TEXT NOT NULL, `emailsubject` VARCHAR(255) NOT NULL DEFAULT '', `emailcontent` TEXT NOT NULL, `fiaremail` TINYINT(1) unsigned NOT NULL DEFAULT '0', `fiaremailto` INT(11) unsigned NOT NULL DEFAULT '0', `fiaremailfrom` TEXT NOT NULL, `fiaremailsubject` VARCHAR(255) NOT NULL DEFAULT '', `fiaremailcontent` TEXT NOT NULL, `fiaremailattachment` TEXT NOT NULL, `prehooks` VARCHAR(255) NOT NULL DEFAULT '', `posthooks` VARCHAR(255) NOT NULL DEFAULT '', `parameters` TEXT NOT NULL, PRIMARY KEY (`id`), INDEX `category_id` (`category_id`), INDEX `saveform` (`saveform`), INDEX `email` (`email`), INDEX `fiaremail` (`fiaremail`)) ENGINE=MyISAM`

I think the default values for published_from and published_till must be removed/changed?

Thank you for your reply, unfortunately changing the default values did not solve the issue for us.
Could you explain exactly what you did to solve the issue?

I delete the table and run the SQL query inside PHPMyAdmin. After this, i reinstall formalicious. Did this work for you?

We’ve tried the steps you suggested but unfortunately it didn’t solve the issue for us.
Do you have any other ideas?