Open exponentcms opened 4 years ago
What theme style were you using? And what activity were you in the process of performing?
Hi Dave,
Using 2.5.0, p3 with bootstrap4. Adding form controls using this control (radio buttons, drop down list) are not working. Not able to add or remove options.
The only thing that might cause this error is that the /framework/core/forms/controls/listbuildercontrol.js script is not being loaded. I can't reproduce the error locally.
You might try opening the browser developer window and reloading the page to see if/why the listbuildercontrol.js script isn't loading.
Do you possibly have 'minify' turned on?
I do have minify on...
...But that is not the problem
dev tools tells me: @random5dc1995ee346d:1 Uncaught ReferenceError: addSelectedItem is not defined at HTMLButtonElement.onclick (@random5dc1995ee346d:1) when I try to add an item option, in this case a radio button group
FYI, the addSelectedItem is only found in that script. I was able to reproduce it once, but have been unable since. In practice we seem to load that script twice via XHR since the bootstrap 3/4 form designer is all Ajax driven now, therefore not minified.
If you use the 'network' tab of the browser development window then select 'XHR' and then edit the radio or drop down control you should see the Ajax link appear and then 4 scripts with the above-mentioned script twice.
Added a screenshot...
List builder control not working in forms due to reference error.