Okay
  Public Ticket #2290912
How do we default the event submission form to a specific calendar?
Closed

Comments

  • charleslbryant started the conversation

    We don't want users to have to select a calendar when there is only one to select from. How do we default submission form to default to the only calendar that is created?

  •  785
    Zhivko replied

    Hi,

    In your theme functions.php file add following filter:

    add_filter('stec_builder_front_elements', function($elements) {
        $calendar_id = 1; // set to the calendar id number
        
        $elements['calendar'] = array(
            sprintf('<input type="hidden" name="calendar_id" value="%d" />', $calendar_id)
        );
        
        return $elements;
    });

    Change the $calendar_id value to your calendar id.


    Stachethemes Developer