• Resolved dschulberg

    (@dschulberg)


    Currently walk_category_dropdown_tree() in my code displays my category list for selection when I am adding a new item.

    I have defined my user profile to have an extra field for ‘Organization’ and would like to force the category selection to be fixed to be the value found in the list = ‘Organization’ when adding a new item.

    How can I achieve this locking in of a set value in my list of categories?

    • This topic was modified 5 years, 10 months ago by dschulberg.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dschulberg

    (@dschulberg)

    Let me be a bit more explicit about what I am trying to do.
    I have managed to create an extra field in my user profile = ‘Organization’.
    When a user is adding a new event the organization to which they belong is known. I am using the categories associated with events to be the organizations using my application.

    Hence I would like to bypass the category selection dropdown when a user adds an event with the category for the event being set to the name of the organization to which he/she belongs.

    It looks like the event-editor.php file is the one I need to target. I have followed your guidelines for using templates by copying that file into my theme, but I am unsure as to how to deal with the content in that file.

    Some clues as to how I can achieve this would be appreciated.

    Thread Starter dschulberg

    (@dschulberg)

    I think I have found a way to achieve what I would like.
    I have removed the line

    <?php if(get_option('dbem_categories_enabled')) { em_locate_template('forms/event/categories-public.php',true); } ?>

    from event-editor.php

    Now the categories dropdown does not appear when a subscriber adds a new event. As the admin I can readily add in the category (organization) when I deal with pending events.

    What do the events-manager gurus make of this? Anything I should be aware of?

    Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    What do the events-manager gurus make of this? Anything I should be aware of?

    editing event-editor.php template should be fine and safe.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fixing category list option’ is closed to new replies.