add custom markup on a specific element/filter in a exposed filter (views)

29/06/2018


I’m trying to learn how I can add or modify a markup for a specific filter on my exposed filter. I’m currently rendering the exposed filter using a block it has a lot of Drupal Generated Markup.

So far I’ve managed to identify the ID of the form, have been researching throughout the day for some examples but so far haven’t had any progress

function iom_form_views_exposed_form_alter(&$form, $form_state, $form_id) {

    print_r($form_id);
}

Let say for example I have to add a label with a class and a custom class on the select element and wrap it with a div. Is there a way to build or construct that modified markup?

قالب وردپرس