Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Form.php

function Form::getValues

Gets the field values.

The returned array does not include file fields (

See also

getFiles).

2 calls to Form::getValues()
Form::getPhpValues in vendor/symfony/dom-crawler/Form.php
Gets the field values as PHP.
Form::getUri in vendor/symfony/dom-crawler/Form.php
Gets the URI of the form.

File

vendor/symfony/dom-crawler/Form.php, line 75

Class

Form
Form represents an HTML form.

Namespace

Symfony\Component\DomCrawler

Code

public function getValues() : array {
    $values = [];
    foreach ($this->fields
        ->all() as $name => $field) {
        if ($field->isDisabled()) {
            continue;
        }
        if (!$field instanceof Field\FileFormField && $field->hasValue()) {
            $values[$name] = $field->getValue();
        }
    }
    return $values;
}
RSS feed
Powered by Drupal