Project

General

Profile

Actions

Bug #6116

open

value of checkbox not saved

Added by Nicola Chiapolini about 6 years ago. Updated 5 months ago.

Status:
Priorize
Priority:
High
Assignee:
Carsten Rose
Target version:
Start date:
29.05.2018
Due date:
% Done:

0%

Estimated time:
Discuss:
Prio Planung:
No
Vote:

Description

In one of our forms, we have the following checkbox:

INSERT INTO `FormElement` (`id`, `formId`, `feIdContainer`, `dynamicUpdate`, `enabled`, `name`, `label`, `mode`, `modeSql`, `class`, `type`, `subrecordOption`, `encode`, `checkType`, `checkPattern`, `onChange`, `ord`, `tabindex`, `size`, `maxLength`, `bsLabelColumns`, `bsInputColumns`, `bsNoteColumns`, `rowLabelInputNote`, `note`, `adminNote`, `tooltip`, `placeholder`, `value`, `sql1`, `parameter`, `parameterLanguageA`, `parameterLanguageB`, `parameterLanguageC`, `parameterLanguageD`, `clientJs`, `feGroup`, `deleted`, `modified`, `created`) VALUES
(164, 1000, 380, 'no', 'yes', 'reg_done', 'Final', 'hidden', '{{SELECT IF( title_hash != \'\' AND (SELECT SUM(head) FROM `phd_committee_members` WHERE phd_student=(SELECT id FROM phd_graduation WHERE shortname=\'{{shortname}}\' )) = 1,\'show\', \'hidden\') FROM phd_graduation WHERE shortname=\'{{shortname}}\' }}', 'native', 'checkbox', '', 'specialchar', 'alnumx', '', '', 200, 0, '', '', '', '', '', 'row,label,/label,input,/input,note,/note,/row', '', '', '', '', '', '{{!SELECT IF(reg_done, reg_done, NOW()) FROM phd_graduation WHERE id=\'{{id:RE}}\' }}', 'checkBoxMode = single\r\nlabel2 = Submit this form and start the process.', '', '', '', '', '', '', 'no', '2018-05-29 09:34:25', '2018-03-09 10:06:26');

This checkbox gets correctly displayed with all the values of mode sql below, but only saved to the DB for some of them:

good


{{SELECT IF( title_hash != '' ,'show', 'hidden') FROM phd_graduation WHERE shortname='{{shortname}}' }}
{{SELECT IF( title_hash != '' AND (SELECT SUM(head) FROM `phd_committee_members` WHERE phd_student=(SELECT id FROM phd_graduation WHERE shortname='{{shortname}}' )) = 1,'show', 'hidden') FROM phd_graduation WHERE shortname='{{shortname}}' }}

bad


{{SELECT IF( title_hash != '' ,'show', 'hidden') FROM phd_graduation WHERE id='{{id}}' }}
{{SELECT IF( title_hash != '' ,'show', 'hidden') FROM phd_graduation WHERE shortname='{{shortname:R0}}' }}
{{SELECT IF( title_hash != '' ,'show', 'hidden') FROM phd_graduation WHERE shortname='{{shortname:FR0}}' }}
{{SELECT IF( title_hash != '' AND (SELECT SUM(head) FROM `phd_committee_members` WHERE phd_student='{{id:R0}}') = 1,'show', 'hidden') FROM phd_graduation WHERE id='{{id:R0}}' }}

shortname is a nativ / extra field in the form, id is not part of the form.

In any case, a displayed field should also be saved ;-)

Actions

Also available in: Atom PDF