WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Support [location_form] for adding a location (4 posts)

  1. Daedalon
    Member
    Posted 1 year ago #

    The front-end has a good support for adding events via [event_form]. The same should be made possible via a similar shortcode [location_form].

    We have increasingly many user cases where users just want to add and search for locations, and some locations are interesting for users despite never having a single event. There's also a need for sometimes to add details of a location before adding its events later, and currently users are wondering why they have to first create a ghost event and then remove it in order to create a location without events.

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

  2. Daedalon
    Member
    Posted 1 year ago #

    Placing

    function my_em_get_location_form_shortcode( $args = array() ){
    	return em_get_location_form( $args );
    }
    add_shortcode ( 'location_form', 'my_em_get_location_form_shortcode');

    in a custom plugin, as Marcus suggested, added support for [location_form]. Thanks Marcus! I was able to add an event using this front end form. Adding it into a theme's functions.php should work as well.

    Caveats:

    1. The form shows "Location not found" as a default placeholder for the map, while [event_form] uses a more suitable empty placeholder.

    2. Some custom CSS and jQuery features might need to be adjusted to affect this form as well.

    3. When submitting the form, the success message was displayed twice.

    4. Feature or bug: there are no automatic dropdown suggestions that would warn users that the place already exists. This is not a showstopper in any way and can be improved upon later.

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    the caveats may be why I didn't add that recently ;)

  4. Daedalon
    Member
    Posted 1 year ago #

    Very possible :)

    The caveats are very minor though. Similar ones are found and fixed in the plugin on a daily basis. Some of these will get fixed faster after some user feedback. #2 is a good example of one where it's not even possible for one person to confidently say he has tested for every possible customization.

    Also the longer until it's published, the more likely it is that people make customizations that don't take this form into accord though they might want to, if they knew it was possible to have :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.