Mixing Static Values Form_Cookies.Data

I tried to use static value=“Foreign” and dmx-bind:value=“form_cookies.data…” in the same input type=“radio”; after submitting the form, the value for that field was blank in the database.

Afterward I removed the cookies value from the input, and the static value was inserted into the database as it should.

What am I doing wrong? Can these two binding types be use together?

Hello, you cannot mix static data with dynamic data like that.
What are you trying to achieve?

Like Teodor says you should not mix both of them, you will never know which of the 2 will be applied.

I think you want the static value as a default value when the cookie is not set, why not use an expression as dmx-bind:value="form_cookies.data.savedValue.default('Foreign')". It is get the data from the cookie and return ‘Foreign’ when there is no data in the cookie.

Thanks Patrick! That’s exactly what I am doing. Would there be any other instructions seeing that it is a radio button / checkbox?

Would there be any other instructions or potential problems seeing that these are radio buttons and/or checkboxes?