Support » Plugin: Events Manager » Changing the Submission Form – Regions Field

  • Resolved bartvdploeg1

    (@bartvdploeg1)


    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/

Viewing 7 replies - 1 through 7 (of 7 total)
  • caimin_nwl

    (@caimin_nwl)

    NetWebLogic Support

    bartvdploeg1

    (@bartvdploeg1)

    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?

    caimin_nwl

    (@caimin_nwl)

    NetWebLogic Support

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

    bartvdploeg1

    (@bartvdploeg1)

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

    caimin_nwl

    (@caimin_nwl)

    NetWebLogic Support

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

    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

    caimin_nwl

    (@caimin_nwl)

    NetWebLogic Support

    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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changing the Submission Form – Regions Field’ is closed to new replies.