Project

General

Profile

Actions

Bug #84081

closed

Forms altered by hooks are not updated in form editor until editor is reloaded

Added by Jurian Janssen over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
Form Framework
Target version:
-
Start date:
2018-02-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
forms
Complexity:
Is Regression:
Sprint Focus:

Description

When a form definition is altered in one of the hooks that can be called via the Form engine (beforeFormSave, beforeFormCreate, beforeFormDuplicate) the altered information is correctly stored in the yaml file, but not in the form editor itself. I assume that the form editor does not reload the YAML or the changes made during the calling of a hook.

However, when a form is saved, altered by a hook and one then exists the form editor and re-opens it via the Forms module, the changes are there. Most likely because the editor now reads the entire yaml file.

Example: I create a form with a textfield called X. If I save, the the formstructure is sent to Mautic. However, to later edit field X I need the id mautic has given to field X. So I save the mautic id of field X in the yaml. This works fine. Except, when I press save, the yaml is updated, but the form editor does not reload the yaml sdo it doesn't know a mautic id has been given to field X. If I now press save again the form editor thinks there is no Mautic id, and creates again a new field in mautic (because the field is being posted without an id). Only when I exit the editor and then go back in (so reload the entire editor) the new yaml will be loaded.

In other words, whatever modifications you make with a hook, the form editor does not know until you close and re-open it again.

Actions

Also available in: Atom PDF