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 - how to force a category id?

March 04, 2011 5:53pm

Subscribe [3]
  • #1 / Mar 04, 2011 5:53pm

    David Hyland

    210 posts

    For one particular safecracker form I need to set the category. I’m sure this must be a simple question with a really obvious answer but I just can’t figure it out?

    I’ve tried adding category=“3” into the main tag and also hidden fields, but no avail ... ?

    Am i missing something or am I just being daft ?

  • #2 / Mar 05, 2011 3:42am

    Cheif

    626 posts

    Set the default category in your channels settings ?

  • #3 / Mar 05, 2011 11:54am

    Rob Sanchez

    335 posts

    Your hidden input should look like this:

    <input type="hidden" name="category[]" value="3" />
  • #4 / Mar 06, 2011 10:37am

    Sue Crocker

    26054 posts

    Thanks for the assist, Rob.

    David, does that answer your question?

  • #5 / Mar 07, 2011 1:12pm

    David Hyland

    210 posts

    Yes that’s great, thanks Rob/Sue 😊

  • #6 / Mar 07, 2011 5:08pm

    Ingmar

    29245 posts

    Excellent. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases