File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public function isValidValue($value): bool {
106106 }
107107
108108 public function prepareQuestionInputForSave ($ input ) {
109- if (! isset ($ input ['itemtype ' ]) || empty ($ input ['itemtype ' ])) {
109+ if (isset ($ input ['itemtype ' ]) && empty ($ input ['itemtype ' ])) {
110110 Session::addMessageAfterRedirect (
111111 __ ('The field value is required: ' , 'formcreator ' ) . ' ' . $ input ['name ' ],
112112 false ,
@@ -115,8 +115,7 @@ public function prepareQuestionInputForSave($input) {
115115 return [];
116116 }
117117
118- $ itemtype = $ input ['itemtype ' ];
119- $ input ['itemtype ' ] = $ itemtype ;
118+ $ itemtype = $ input ['itemtype ' ] ?? $ this ->getSubItemtype ();
120119 $ input ['values ' ] = [];
121120 // Params for entity restrictables itemtypes
122121 $ input ['values ' ]['entity_restrict ' ] = $ input ['entity_restrict ' ] ?? self ::ENTITY_RESTRICT_FORM ;
You can’t perform that action at this time.
0 commit comments