Skip to content

Commit 7872379

Browse files
committed
fix(form): show a warning when trying to unset form answer name
1 parent 9a6fdde commit 7872379

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

inc/form.class.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,11 @@ public function prepareInputForUpdate($input) {
11061106

11071107
if (isset($input['formanswer_name']) && strlen($input['formanswer_name']) < 1) {
11081108
unset($input['formanswer_name']);
1109+
Session::addMessageAfterRedirect(
1110+
__('Cannot use empty name for form answers. Keeping the previous value', 'formcreator'),
1111+
false,
1112+
WARNING
1113+
);
11091114
}
11101115

11111116
if (!$this->skipChecks) {

0 commit comments

Comments
 (0)