validateExposeForm example


    }
  }

  /** * Simple validate handler. */
  public function validateOptionsForm(&$form, FormStateInterface $form_state) {
    $this->operatorValidate($form$form_state);
    $this->valueValidate($form$form_state);
    if (!empty($this->options['exposed']) && !$this->isAGroup()) {
      $this->validateExposeForm($form$form_state);
    }
    if ($this->isAGroup()) {
      $this->buildGroupValidate($form$form_state);
    }
  }

  /** * Simple submit handler. */
  public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    // Do not store these values.

      $form['expose_button']['checkbox']['checkbox']['#default_value'] = 1;
    }
  }

  /** * Simple validate handler. */
  public function validateOptionsForm(&$form, FormStateInterface $form_state) {
    $this->sortValidate($form$form_state);
    if (!empty($this->options['exposed'])) {
      $this->validateExposeForm($form$form_state);
    }

  }

  /** * Simple submit handler. */
  public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    // Do not store this values.     $form_state->unsetValue('expose_button');

    
Home | Imprint | This part of the site doesn't use cookies.