Okay
  Public Ticket #2240003
Builder
Closed

Comments

  • ccmodesto started the conversation

    How can i choose the icon type on the front end form?

  •  877
    Zhivko replied

    Hi,

    From the "Select Icon" dropdown.


    Stachethemes Developer

  • ccmodesto replied

    i think i am missing something, what i need to do on the front end event submit form, is allow for choosing Date instead of icon, like you can on the backend. i realize i can drop down to select an icon, but i want to change to Date

  •  877
    Zhivko replied

    Hi,

    This selector is currently missing in the builder. I'll add it in the next update.

    Meanwhile you could add filter that will automatically set the icon type to "date". 

    Example:

    Place this code in your theme functions.php file:

    add_filter('stec_insert_post', function($data) {
        if ($data['post_type'] !== 'stec_event') {
            return $data;
        }     $task = \Stachethemes\Stec\Admin_Helper::post('task', null);     if ($task === 'front_create_event') {
            $data['meta_input']['icon_type'] = 'date';
        }     return $data;
    });




    Stachethemes Developer

  • ccmodesto replied

    That is great thank You!