• Resolved Fred17

    (@f14m07)


    Hi Franky

    In the default form.php the code for event_category_ids is :

    <?php } 
    if (get_option('eme_categories_enabled')) { ?>
    <div class="input select">
        <label for="event_category_ids"><?php _e('Select the Event Category','events-made-easy-frontend-submit'); ?> <small><?php _e('required','events-made-easy-frontend-submit'); ?></small></label><br/>
    
        <?php EMEFS::field('event_category_ids'); ?>
    
        <?php EMEFS::error('event_category_ids'); ?>
    
    </div>?>
    
    

    I would like to force the category, for exemple to 4, and do not give the choice on the form. As several user can use EMEF but with different form (monform.php and wishform.php that are on different pages with a shortcode with different parameters). So I think I can not use a filter. Have you a solution for that please ? If I do not put those lines in the form the category 1 is used by default. I would like to force category according the used form.

    Have a nice day

    Frédéric

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Franky

    (@liedekef)

    Currently I can’t provide a solution here … one thing comes to mind though: you could check the page id in the filter you’d use. So the default cat (in the EMEFS settings) could be used for monform.php and you could use emefs_event_insert_filter to change the value of the cat for the form on the page wishform.php

    Thread Starter Fred17

    (@f14m07)

    Thanks, I’ll look into it

    Thread Starter Fred17

    (@f14m07)

    Yes it works, I give an example of code if anyone is interested

    $identifiant=get_the_ID();
    if ($identifiant=3893) {$event['event_category_ids']=4;}
    if ($identifiant=133) {$event['event_category_ids']=1;}

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to force the event category’ is closed to new replies.