buildExposedForm example

if ($handler->canExpose() && $handler->isExposed()) {
          // Grouped exposed filters have their own forms.           // Instead of render the standard exposed form, a new Select or           // Radio form field is rendered with the available groups.           // When a user chooses an option the selected value is split           // into the operator and value that the item represents.           if ($handler->isAGroup()) {
            $handler->groupForm($form$form_state);
            $id = $handler->options['group_info']['identifier'];
          }
          else {
            $handler->buildExposedForm($form$form_state);
          }
          if ($info = $handler->exposedInfo()) {
            $form['#info']["$type-$id"] = $info;
          }
        }
      }
    }

    $form['actions'] = [
      '#type' => 'actions',
    ];
    
Home | Imprint | This part of the site doesn't use cookies.