MIGX icon indicating copy to clipboard operation
MIGX copied to clipboard

MIGX 2.11.0 - default value is not updated

Open systemshock89 opened this issue 8 years ago • 6 comments

I have a configuration with several formtabs. In each of the formtabs there are fields with the same filedname. This filednames have default values. In this version MIGX when the formtab is changed, the default value is not updated.

systemshock89 avatar Jul 31 '17 20:07 systemshock89

I would say, this is expected bahaviour. If you have a value in one formtab in a field. The same field in another formtab should have the same value after switching. The default-value is only used, as long, as the field is empty. If you need different values between different formtabs, you have to use different fieldnames.

Bruno17 avatar Aug 01 '17 06:08 Bruno17

But I need the same field in different formtabs to have different default values. Depending on which of the formtabs is selected, it shows its default value. I have a hidden field: MIGX_chunk. For each of the formtabs, I specify my default value of the chunk. In this way, I implement the addition of blocks with different chunks to the resource modx. Is it now possible to do this?

systemshock89 avatar Aug 01 '17 07:08 systemshock89

can't you use

&tpl=`@FIELD:MIGX_formname`

like shown here: https://docs.modx.com/extras/revo/migx/migx.tutorials/migx.varying-layout-boxes

Bruno17 avatar Aug 01 '17 09:08 Bruno17

Thank you. But often need other fields (created by the user, not just the MIGX_formname field), where the default value is deleted depending on the selected formtab. It would be nice if it functions as before ..

systemshock89 avatar Aug 01 '17 13:08 systemshock89

Like written above, the value of a field with the same name has to carried from one formtab to the others, when switching between them. We don't want to loose values, while switching forth and back. If that didn't work like that before, it was a bug. And if you need different values between formtabs, use different fieldnames, as I said. Then you can use different placeholders in your different chunks and you should be good.

Bruno17 avatar Aug 01 '17 14:08 Bruno17

in which file should I change the logic to the old one? To work as in version 2.9.6?

systemshock89 avatar Nov 24 '17 13:11 systemshock89