required fileds submit form

Home Forums Calendar Products Community Events required fileds submit form

  • This topic has 32 replies, 5 voices, and was last updated 6 years, 3 months ago by dsb cloud services GmbH & Co. KG.
Viewing 15 posts - 16 through 30 (of 32 total)
  • Author
    Posts
  • #1316619
    Victor
    Keymaster

    This reply is private.

    #1329081
    Victor
    Keymaster

    Hello Patrick!

    Just wanted to share with you that a new maintenance release (for the Week of 24 July 2017) is out, including a fix for this issue 🙂

    Find out more about this release → https://theeventscalendar.com/maintenance-release-week-24-july-2017/

    Please update the plugins and let us know if the fix works for your site.

    Best,
    Victor

    #1329300

    Hi Victor,

    thanks for letting me know. 🙂
    I just installed the updates.
    Sadly there are no changes at all.

    Greetigns
    Patrick

    #1330056
    Victor
    Keymaster

    Hello Patrick!

    Thanks for following up with this.

    I’m really sorry this isn’t working for you.

    I know you wanted to require the organizer, is it not working for organizer or other fields too?

    Could you please try the following code snippet and see if it works for requiring venue and organizer? I could make it work with this:

    add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 );
    
    function my_community_required_fields( $fields ) {
    
    if ( ! is_array( $fields ) ) {
    return $fields;
    }
    
    $fields[] = 'venue';
    $fields[] = 'organizer';
    
    return $fields;
    }

    Please let me know about it.

    Thanks,
    Victor

    #1330572

    Hi Victor,

    for testing purpose I’ve added all possible requiered fields

    add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 );
    
    function my_community_required_fields( $fields ) {
    
    if ( ! is_array( $fields ) ) {
    return $fields;
    }
    $fields[] = 'post_content';
    $fields[] = 'event_image';
    $fields[] = 'EventStartDate';
    $fields[] = 'EventStartHour';
    $fields[] = 'EventStartMinute';
    $fields[] = 'EventStartMeridian';
    $fields[] = 'EventEndDate';
    $fields[] = 'EventEndMinute';
    $fields[] = 'EventEndHour';
    $fields[] = 'EventEndMeridian';
    $fields[] = 'is_recurring';
    $fields[] = 'EventCurrencySymbol';
    $fields[] = 'tax_input (for event categories)';
    $fields[] = 'venue';
    $fields[] = 'organizer';
    $fields[] = 'EventShowMapLink';
    $fields[] = 'EventURL';
    
    return $fields;
    }
    
    add_filter( 'tribe_events_community_required_venue_fields', 'my_venue_community_required_fields', 10, 1 );
    
    function my_venue_community_required_fields( $fields ) {
        
        if ( ! is_array( $fields ) ) {
            return $fields;
        }
    
    $fields[] = 'Venue';
    $fields[] = 'Address';
    $fields[] = 'City';
    $fields[] = 'Province';
    $fields[] = 'State';
    $fields[] = 'Zip';
    $fields[] = 'Phone';
    $fields[] = 'URL';
    
        return $fields;
    }
    
    add_filter( 'tribe_events_community_required_organizer_fields', 'my_organizer_community_required_fields', 10, 1 );
    
    function my_organizer_community_required_fields( $fields ) {
        
        if ( ! is_array( $fields ) ) {
            return $fields;
        }
    
    $fields[] = 'Organizer';
    $fields[] = 'Phone';
    $fields[] = 'Website';
    $fields[] = 'Email';
    
        return $fields;
    }

    None of them is working

    Greetings
    Patrick

    #1330914
    Victor
    Keymaster

    Hi Patrick!

    The code you sent is working for me. Are you placing the code in your active theme’s functions.php file?

    Are you using any plugin to do so?

    Let me know about it.

    Best,
    Victor

    #1333298

    Hi Victor,

    initial I had the code in my theme/trive-events/community/edit-event.php
    But now I moved it into my theme’s function.php.
    And now, some of them are working but the both I need don’t
    Even more, now I can’t search for categories anymore, I get an “loading faild” error. Even if I undo my changes the problem remains. I already installed the newest updates. It also didn’t helped.

    I don’t use any plugin for modifying my function.php. I manually copy & paste the code 😉

    Greetings
    Patrick

    #1333308

    Ok, I was able to get things back to work. The “loading faild” is gone and ones again I get my categories. I had to reinstall the whole core Plugin.
    Sadly the remaining problems stay 🙁

    #1333485
    Victor
    Keymaster

    Hello Patrick!

    Thanks for following up with this and keep me posted about the updates.

    Good to know at least some of the required fields are working now. This means the code is in the right place 🙂

    Now, could you please tell me what required fields aren’t working for you and share the actual code you are using?

    If you could share with me the community add link it would be great so I can see for myself.

    Thanks,
    Victor

    #1339545

    Hi Victor,

    sorry for my late reply. I didn’t receive an notification email that someone wrote an answer.
    My function.php looks like this:

    <?php
    # 2017-07-25, fries: Funktion für Anzeige der Event-Kategorien hinzugefügt
    # 2017-06-21, fries: Wörter im Kalender-Plugin ändern
    #$custom_text = array(
    #'Related %s' => 'Similar %s',
    #'category' => 'Raum',
    #'taxonomy' => 'Raum',
    #'TAXONOMY' => 'Raum',
    #'Kategorien' => 'Raum',
    #);
    # 2015-06-01, schoch: Schlagworte mit the_tags eingefuegt
    function et_divi_post_meta() {
            $postinfo = is_single() ? et_get_option( 'divi_postinfo2' ) : et_get_option( 'divi_postinfo1' );
    
            if ( $postinfo ) :
                    echo '<p class="post-meta">';
                    et_postinfo_meta( $postinfo, et_get_option( 'divi_date_format', 'M j, Y' ), esc_html__( '0 comments', 'Divi' ), esc_html__( '1 comment', 'Divi' ), '% ' . esc_html__( 'comments', 'Divi' ) );
    				echo ' | ';
    				the_tags();
    				echo '</p>';
            endif;
    }
    
    function remove_google_fonts_from_theme() {
       //get rid of those google fonts
       //remove_action('et_head_meta','et_add_google_fonts');
       //remove_action( 'wp_head', 'et_set_font_properties' );
       remove_action( 'wp_enqueue_scripts', 'et_divi_load_fonts' );
    }
    
      add_action( 'after_setup_theme', 'remove_google_fonts_from_theme' );
    if ( class_exists('Tribe__Events__Main') ){
     
        
       /* get event category names in text format */
        function tribe_get_text_categories ( $event_id = null ) {
     
            if ( is_null( $event_id ) ) {
                $event_id = get_the_ID();
            }
     
            $event_cats = '';
     
            $term_list = wp_get_post_terms( $event_id, Tribe__Events__Main::TAXONOMY );
     
            foreach( $term_list as $term_single ) {
                $event_cats .= $term_single->name . ', ';
            }
     
            return rtrim($event_cats, ', ');
     
        }
     
    }  
     ?>
    
     <?php
    add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 );
     
    function my_community_required_fields( $fields ) {
     
    if ( ! is_array( $fields ) ) {
    return $fields;
    }
    $fields[] = 'tax_input'; 
    $fields[] = 'venue';
     
    return $fields;
    }
    
    add_filter( 'tribe_events_community_required_venue_fields', 'my_venue_community_required_fields', 10, 1 );
    
    function my_venue_community_required_fields( $fields ) {
        
        if ( ! is_array( $fields ) ) {
            return $fields;
        }
    
        $fields[] = 'Venue';
    
        return $fields;
    }
    ?>

    I can’t get it work that the fields Event-Categories and venues are requiered. I uploaded a screenshot for a better understanding, which fields I mean.
    Sadly I can’t send you a link to the community-link because the website is only internal accessable.

    Greetings
    Patrick

    #1340110
    Victor
    Keymaster

    Hi Patrick!

    Thanks for coming back with the code you are using and for the screenshot.

    I could reproduce the issue you are having. Requiring the tax_input does not work as you’d expect.

    I have logged a new report for this so it can be addresses in one the next maintenance releases. We’ll let you know as soon as a bugfix is released for it.

    I apologise for this issue and we’d appreciate your patience while we work on this.

    Best,
    Victor

    #1387491
    Courtney
    Member

    We released an update for this issue. Can you update your plugins (preferrably on a staging site) and see if that resolves the issue.

    https://theeventscalendar.com/maintenance-release-week-13-november-2017/

    Thanks
    Courtney ?

    #1387731

    Hi Courtney,

    thank’s for the information.
    I just updated our website and gave it a try. Sadly it seems, nothing have chanced 🙁
    I got still the same problem.

    Greetings
    Patrick

    #1388067
    Victor
    Keymaster

    Hi Patrick!

    Thanks for following up with this.

    We are still in the process of updating the Knowledgebase articles for this, but here’s the code you should use to make the event category a required field:

    add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields' );
    function my_community_required_fields( $fields ) {
       if ( is_array( $fields ) ) {
          $fields[] = 'tax_input.tribe_events_cat';
       }
       return $fields;
    }

    Please try it out and let me know if it works for you.

    Thanks,
    Victor

    #1392139

    Hi Victor,

    great thing!! The Event Categories finally work as intended. 🙂
    But sadly I got a problem with the venues.
    The venue-field gets labeld as requiered, but this will not be checked.
    I hope it’s visible in my screenshot.

    Greetings Patrick

Viewing 15 posts - 16 through 30 (of 32 total)
  • The topic ‘required fileds submit form’ is closed to new replies.