WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Changing the Submission Form - Regions Field (8 posts)

  1. bartvdploeg1
    Member
    Posted 1 year ago #

    Hi,

    I am wondering how I can change the submission form for Events Manager.

    I changed a while ago the regions field name. Is it possible to make this field a required field? It would be nice when I can get there a drop-down list (as in the Countries field) with the available possibilities (12 regions..). As I try to search for an event yet, there are many 'regions' in the list with very little differences in their names. It would be great when the uploader of an event can choose the right region.

    Anyone who can explain me, step by step how I can realize this?

    https://wordpress.org/plugins/events-manager/

  2. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

  3. bartvdploeg1
    Member
    Posted 11 months ago #

    That solution doesn't seem to work. I changed the
    user_name field to em-location-data-region without effect.

    function em_validate($result, $EM_Event){
     if (!is_user_logged_in() && $_REQUEST['em-location-data-region'] == ''){
      $EM_Event->add_error('Provincie is vereist...');
      $result = false;
     }
     return $result;
    }
    add_filter('em_event_validate','em_validate', 1, 2);

    Do you, or someone else know, how I can get a drop-down list as described above?

  4. caimin_nwl
    NetWebLogic Support
    Posted 11 months ago #

    Do users need to be logged in to submit the form?

  5. bartvdploeg1
    Member
    Posted 11 months ago #

    No, they don't have to login to submit.

  6. caimin_nwl
    NetWebLogic Support
    Posted 11 months ago #

    The snippet should work. Can you post a link? We might be able to see what's going wrong. Thanks.

  7. bartvdploeg1
    Member
    Posted 9 months ago #

    I think I've placed the code in the wrong file. Is it meant to be in the theme functions.php or the classes/em-event.php file? It is now in the theme functions.php.

    The event submission form

  8. caimin_nwl
    NetWebLogic Support
    Posted 9 months ago #

    It needs to be in the functions.php file of your theme. It's not a good idea to edit the core files of the plugin as the edits will be lost when the plugin upgrades.

    In your snippet, instead of em-location-data-region try location-region.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic