diff --git a/Resources/views/Form/fields.html.twig b/Resources/views/Form/fields.html.twig index 56f5b8733..b25ec65cd 100644 --- a/Resources/views/Form/fields.html.twig +++ b/Resources/views/Form/fields.html.twig @@ -76,7 +76,9 @@ }); } - jQuery(document).ready(initializeCFChoiceOptionsChoices('{{ form.vars.id }}')); + document.addEventListener('DOMContentLoaded', function(event) { + jQuery(document).ready(initializeCFChoiceOptionsChoices('{{ form.vars.id }}')); + }); {% endblock cf_choices_row %}