ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Safecracker and multiple categories

January 30, 2012 12:01pm

Subscribe [1]
  • #1 / Jan 30, 2012 12:01pm

    Safecracker seems to be broken when using multiple categories. For category details to be saved the form must post the details with:

    name="category[]"

    The problem is that you can’t have two form inputs/selects with the same name and thus you can’t separate categories by group. There is a JS solution that would work, but I’d rather not do that. Any ideas?


    EE 2.4.0.

  • #2 / Jan 31, 2012 1:44pm

    Kevin Smith

    4784 posts

    Hi Paul,

    I’m afraid I don’t fully understand the problem you’re facing. Would you mind going into a bit more detail about the problem and include some sample code? And is there a reason you’d rather not use the JS solution?

    I’m looking forward to helping you resolve this!

  • #3 / Feb 01, 2012 3:55pm

    First of all, I made a mistake in my original post. You can have two form controls with the same name, but this should be avoided unless they’re meant to be grouped, and for compatibility they should end with brackets.


    Well, are some trial and error the problem just seems to have resolved itself. Thanks for your support.

    Paul

  • #4 / Feb 05, 2012 7:23am

    Sean C. Smith

    3818 posts

    Paul,

    Glad to see that you have fixed the problem yourself. I’m going to close out this thread, but feel free to post again when you have more questions.

    Sean

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases