In Craft CMS I can see views of my my entries through singles, structures, or channels.

I can see a lightswitch checkbox have a green check in the view. I'd like to be able to edit the view directly without opening up the form.

If I have 50 entries and I need to quickly check or uncheck them, I don't want to do it 50 times. Does this feature exist? If not, is there a custom plugin to do it? If not, any idea how I myself can make the custom plugin?

1 Answer 1


You can't do this from the CP (although P&T mention here that it might be in Craft 5), but for the time being you can likely accomplish what you need with a single CLI command. See here: https://craftcms.com/knowledge-base/bulk-resaving-elements#resaving-with-specific-field-values

For a lightswitch field, you'd need to set it to 1 (on) or 0 (off). So for example, to turn them on for all entries in a blog section:

php craft resave/entries --set myLightSwitchFieldHandle --to 1 --section blog

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.