- Issue created by @avall-llovera
- 🇨🇦Canada karing 🇨🇦
Thank you for the report. To help get to this fast(er) can you create a PR on https://github.com/colemanw/webform_civicrm or sponsor us to fix it -> https://webform-civicrm.io/
PS - are you in Alberta? Me too :-)
Thanks! I'll create the Issue there.
I'm not from Alberta, I just copied your example from the related Issue ;)- 🇺🇸United States MegaphoneJon
I can't replicate @avall-llovera's issue but I think I have the same root cause. My [webform_submission:values] token renders a state/province as its ID. This worked in 2022.
I think sure this happens because we don't dynamically update the options "the Drupal way". We're using `populateStates()` in webform_civicrm_forms.js.
This doesn't update the webform's Form API values. So without any `#options`, state/province doesn't convert the value.
I think the solution is an AJAX callback (add a `#ajax` element to the field in the Form API) to fill `#options`.
If we did that, we should also be able to remove the disabling of form validation of state/province in `prepareElementValidateCallbacks()`.
- Status changed to Needs review
10 months ago 12:36pm 29 January 2024 - 🇮🇳India jitendrapurohit
PR has been raised for the fix https://github.com/colemanw/webform_civicrm/pull/941.