I'm developing a custom plugin but hitting an issue when I want to save a settings that uses the multiSelect, checkboxSelect or checkboxGroup fields (essentially any field that saves values as an array).

At present all I get is a Couldn’t save plugin settings error but nothing in the CMS or server logs to suggest why the plugin settings couldn't be saved.

Is there a specific rule that I need in my settings model to get this to work? In Craft 2 there was a prepSettings() method which could be used to prepare data from the settings but can't see anything similar in Craft 3/Yii.

  • My guess is that less to do with an array and more to do with one of the settings module's rules not validating. Can you disable all rules and test it again and/or provide more information in your question? – Ben Croker Oct 4 '19 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.