• Resolved inula

    (@janetb)


    Hi, I’m using EM 5.6.1
    I would like a dropdownlist for regions, at the ‘Create Event’ page. Therefor I made following changes in templates/forms/event/location.php

    <tr class=”em-location-data-region”>
    <th><?php _e ( ‘Region:’, ‘dbem’ )?> *</th>
    <td><select id=”location-region” name=”location_region”>
    <option value=”0″>Selecteer provincie</option>
    <option value=”Groningen”>Groningen</option>
    <option value=”Friesland”>Friesland</option>
    <option value=”Drenthe”>Drenthe</option>
    <option value=”Overijssel”>Overijssel</option>
    <option value=”Flevoland”>Flevoland</option>
    <option value=”Gelderland”>Gelderland</option>
    <option value=”Utrecht”>Utrecht</option>
    <option value=”Noord-Holland”>Noord-Holland</option>
    <option value=”Zuid-Holland”>Zuid-Holland</option>
    <option value=”Zeeland”>Zeeland</option>
    <option value=”Noord-Brabant”>Noord-Brabant</option>
    <option value=”Limburg”>Limburg</option>
    </select>
    </td>
    </tr>

    When adding a new location, everything works fine.
    But when retrieving an existing location, region is not shown on screen.
    What am I missing?

    https://www.ads-software.com/plugins/events-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    at the moment region field is using ajax under events-manager/includes/js/events-manager.js line $('.em-search-form select[name=country]')

    Thread Starter inula

    (@janetb)

    Hi Gelo,

    I don’t mean the search form but the add-event-form.
    But thanks to the js-file you mentioned, I found it anyway:
    Of course I had to add “selected” in the drop-down list…

    //Finally, add autocomplete here
    //Autocomplete
    OLD: jQuery(‘input#location-region’).val(ui.item.region);
    NEW: jQuery(‘select#location-region option[value=”‘+ui.item.region+'”]’).attr(‘selected’,selected’);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Drop-down list regions’ is closed to new replies.