Feature Requests for FES

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 7 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17484

    I would like the option for what text I want displayed when a user is logged in. For example, I’d prefer to display their “friendly name” instead of their email address.

    I’d also like an option that only allows them to select ONE category, not multiple categories. Also, I’d like the ability to select the default category.

    The P tag inside of the “eo-event-form-error eo-fes-form-notice-submission-complete” class needs its own classes. One class for before the form is submitted and one class for after the form is submitted so that the input and result can be styled separately.

    And the ability to hide categories from the form. For example, I have a “Vacation” category that is filled out from a different form. I don’t want FES to show that category as an option.

    Thanks!

    Dave Navarro
    #17488

    Hi Dave,

    The notices are filtered, so you can remove/edit them if required:

    add_filter( 'eventorganiser_fes_form_display_notices', 'my_user_logged_in_notice', 10, 2 );
    function my_user_logged_in_notice( $notices, $form_view ){
    
        if ( isset( $notices['logged-in-as'] ) ) {
    
            $current_user = wp_get_current_user();
    
            $notices['logged-in-as'] = sprintf(
                __( 'You are logged in as <strong>%s</strong>. <a href="%s">Not you?</a>', 'eventorganiserfes' ),
                $current_user->display_name,
                wp_logout_url( get_permalink() )
            );
        }
    
        //or unset( $notices['logged-in-as'] ); to remove
    
        return $notices;
    }
    

    (That should go in a utility plug-in: http://wp-event-organiser.com/blog/tutorial/where-should-i-put-code-from-the-tutorials/)

    The eo-fes-form-notice-submission-complete class is a bug. This be fixed: In the next release the class will be: eo-fes-form-notice-<notice-identifer> where <notice-identifer> is an index in the above array. E.g.:

    • eo-fes-form-notice-logged-in-as – for the ‘you are logged in as’ notice
    • eo-fes-form-notice-confirmation – for the submission confirmed notice
    Stephen Harris
    #17490

    Thanks!

    Hopefully you can add the ability to filter the categories displayed in a form and include an option for the user to only select a single category (radio boxes instead of check boxes).

    Dave Navarro
    #23871

    Hi Dave,

    I forgot to update this post, but since the 1.3.0 release, you can replace the default templates with your own (templates/elements/eo-event-form-event-category.php) – just copy the file into your theme and change it.

    That will only change the UI. That might be fine in some contexts, but it would still be possible for user to assign multiple categories (hacking the HTML mark of the page). To make sure they can’t, you need a server side check using the eventorganiser_validate_fes_form_submission hook (I can provide an example if required).

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.