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?
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.