- Issue created by @patrickfweston
- Merge request !7Add options to allow the destination query parameter to override the URL β (Open) created by patrickfweston
- Status changed to Needs work
5 months ago 10:59am 21 June 2024 - π¬π§United Kingdom very_random_man
I've come across this problem too. The patch works well but the
#states
in the form don't work as intended. The problem is that thechecked
state that exists to automatically check the box when there isn't a URL value also forces the box to being unchecked when a value is filled in. So whilst it works the first time you fill out the form, when you save it the box becomes unchecked even though there is a default value for it.I don't think it's possible to get
#states
to check a box under one condition and do nothing for the opposite condition. The only thing I could find online about this was this guy who was trying (and failing) to get the same sort of behaviour.
https://drupal.stackexchange.com/questions/87209/with-states-how-to-unch...I think this probably needs a bit of custom JS rather than
#states
to handle the checked behaviour. - π¨π³China kongkx
`config/schema/user_redirect.schema.yml` is needed to serialize the config value properly.