WordPress.org

Forums

Events Manager
[resolved] Disable hour selection is "all day" chosen (5 posts)

  1. Otto Kekäläinen
    Member
    Posted 6 months ago #

    Hello,

    Usability feature request: disable hour fields is "all day" is selected. This could be easily done in JQuery, something in line of:

    $("#em-time-all-day").toggle(function (){
    $("#start-time").attr("disabled",true);
    $("#end-time").attr("disabled",true);
    };

    (idea code, not final, not tested)

    Steps to reproduce:
    1. open http://demo.wp-events-plugin.com/submit-your-event/
    2. select "all day"
    result: start and end hour fields are available
    expected: these fields should be disabled, since the event is all day and allowing to select meaningless hours is bad usability

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 6 months ago #

    hi,

    you can try conditional placeholders at http://wp-events-plugin.com/documentation/conditional-placeholders/ e.g. {all_day}content{/all_day} or {has_time}content{/has_time}

  3. Otto Kekäläinen
    Member
    Posted 6 months ago #

    Conditionals are parsed in PHP and affect the event view. I am now talking about a JavaScript feature in the event submission form, please read again my feature request.

    In title "is" whould be "if", sorry for the typo, don't know how to edit it anymore.

  4. agelonwl
    Member
    Posted 6 months ago #

    I see, you can try to add javascript (as per above js) using template files at wp-content/plugins/events-manager/templates/forms/event/when.php

    using template files
    http://wp-events-plugin.com/documentation/using-template-files/

  5. Otto Kekäläinen
    Member
    Posted 6 months ago #

    I think this feature should be by default, since it would benefit everybody.

    If Events Manager was in Git it would be easy for me to fork it, code this and make a pull request to get it upstream, but it is in SVN, so distributed development is a bit difficult..

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.