Project

General

Profile

Bug #6116

value of checkbox not saved

Added by Nicola Chiapolini about 2 years ago. Updated 4 months ago.

Status:
New
Priority:
Urgent
Assignee:
Target version:
Start date:
29.05.2018
Due date:
% Done:

0%

Estimated time:
Discuss:

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 ;-)

History

#1 Updated by Carsten Rose over 1 year ago

  • Target version set to 18.10.3

#2 Updated by Carsten Rose over 1 year ago

  • Target version changed from 18.10.3 to 18.12.1

#3 Updated by Carsten Rose over 1 year ago

  • Target version changed from 18.12.1 to 141

#4 Updated by Carsten Rose 7 months ago

  • Priority changed from Normal to Urgent
  • Target version changed from 141 to 146

#5 Updated by Carsten Rose 6 months ago

  • Status changed from New to Some day maybe

#6 Updated by Carsten Rose 6 months ago

  • Status changed from Some day maybe to New

#7 Updated by Carsten Rose 4 months ago

  • Assignee set to Carsten Rose

#8 Updated by Carsten Rose 4 months ago

  • Target version changed from 146 to next

#9 Updated by Carsten Rose 4 months ago

  • Target version changed from next to next2

Also available in: Atom PDF