terminal42 / contao-mp_forms

Real step separation in the form generator of the Contao Open Source CMS
25 stars 13 forks source link

Inserttag value does not update if used as standard value for field #80

Open Shoekrates opened 7 months ago

Shoekrates commented 7 months ago

Hi, related to https://github.com/terminal42/contao-mp_forms/issues/79 I have encountered a strange behaviour while testing. This could be a bug.

On page 1 I have a checkbox field (field_a) with radio button values yes/no.

On page 2 I have an explanation element that just prints out the value of field_a: Field Value: {{mp_forms::ID::field_value::field_a}} (ID is the form ID) That updates correctly if I go back to page 1, change field_a and return to page 2.

On page 2 I also have a text field (field_b) with a standard value of {{mp_forms::ID::field_value::field_a}} defined with the standard backend field in contao. However the standard value of field_b doesn't get updated stepping back, change field_a and return to page 2. If I use an individual template for the text field where the insert tag is hard coded into the value attribute of the text field the update of the value works as expected and mirrors the update from the explanation field.

Are insert tags used as standard values of form fields handled differently to being used in templates or explanation fields?

Toflar commented 7 months ago

Probably duplicate of https://github.com/terminal42/contao-mp_forms/issues/74?