Events Made Easy Forums Bug fixed or feature request implemented Feature suggestion: 'do_action' on 'eme_event_form'

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #42662
    Anonymous
    Inactive

    I would like to suggest an ‘do_action’ at the end of the ’eme_event_form’ function.

    E.g.:

    if (has_action(’eme_event_form’)) do_action(’eme_event_form’,$event);

    Best/

    Andy

    #47315
    Franky
    Keymaster

    And why an action? The eme_event_form function just shows the form for edit/creation of an event, it doesn’t do anything.

    #47316
    Anonymous
    Inactive

    Hi Franky,

    Yes …I would like to add two form fields to be able to integrate the add/edit form with another application.

    I did some tests, and injected some html and appended it to the form with JavaScript.

    But perhaps there is a better way to hook into that page?

    Best/

    Andy

    #47317
    Franky
    Keymaster

    Adding two form fields results in no change, since it’s eme that’s doing the parsing. Or are you using another plugin with higher priority that’s taking this in first?

    #47318
    Anonymous
    Inactive

    I made my own plugin …dirty, as I’m new to PHP and WordPress.

    I use these:

    add_action(’eme_event_form’, ‘amx_eme_event_form_hook’);

    add_action(’eme_delete_event_action’, ‘amx_eme_db_delete_event’);

    add_action(’eme_update_event_action’, ‘amx_eme_db_update_event’);

    add_action(’eme_insert_event_action’, ‘amx_eme_db_insert_event’);

    In the eme_event_form action I’m adding the html code and placing it with a JavaScript.

    E.g.:

    <script type=”text/javascript”>

    document.write(‘<div class=”postbox” id=”amx_eme_tag_div”><div class=”handlediv” title=”Click to toggle.”>
    </div><h3 class=”hndle”><span>Tags</span></h3><div class=”inside”><div style=”overflow:scroll; height: 250px;”><?php echo str_replace(“‘”, “‘”, $tag_input_checked.$tag_input) ?></div><div><label for=”amx_tag_add”>Tilføj Tags (komma separeret): </label></div><input type=”text” id=”amx_tag_add” name=”amx_tag_add” style=”width: 100%” /></div></div>’);

    document.getElementById(‘post-body-content’).appendChild(amx_eme_tag_div);

    </script>

    I used it to add Tag functionality to the Add/Edit form …but the implementation is so bad, that I will not post i publicly …tell me if you want my code and make a clean version!

    Best/

    Andy

    #47319
    Franky
    Keymaster

    From the changelog in trunk:

    eme_add_booking_form_filter and eme_delete_booking_form_filter filters added, so you can change the form html to your liking

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top