I have custom slider module.

Within that module you can add items (slides) one by one ( with title, caption, aso.. ).

Now I added a checkbox to the same form.

Only one item (slide) should have that checkbox checked at the same time! I dont want to uncheck it on one item and check it on the next -> this should be automatic. So if I check that checkbox for an item it should remove the checked status in DB from the old one.

  • Can you be more clear please? I dont understand what the issue is.
    – mbalparda
    Commented Jul 29, 2014 at 12:48
  • edited, hope its better now ^^ Commented Jul 29, 2014 at 12:59

1 Answer 1


You will have to code your way out of this.

The code should check if the input has a value, load the entire collection, set the checkbox value to 0 in the entire collection, load the single slide where you want to enable the checkbox, set the field, save the object and then save the single element with the new checkbox.

Wth SQL, you can do a mass update without a where condition to avoid loading the entire collection with something like UPDATE SET table.checkbox="0";

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.