public function WebformElementInterface::setDefaultValue in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElementInterface.php \Drupal\webform\Plugin\WebformElementInterface::setDefaultValue()
Set an element's default value using saved data.
The method allows the submission's 'saved' #default_value to be different from the element's #default_value.
Parameters
array $element: An element.
See also
\Drupal\webform\Plugin\WebformElement\DateBase::setDefaultValue
\Drupal\webform\Plugin\WebformElement\EntityAutocomplete::setDefaultValue
1 method overrides WebformElementInterface::setDefaultValue()
- WebformElementBase::setDefaultValue in src/
Plugin/ WebformElementBase.php - Set an element's default value using saved data.
File
- src/
Plugin/ WebformElementInterface.php, line 409
Class
- WebformElementInterface
- Defines the interface for webform elements.
Namespace
Drupal\webform\PluginCode
public function setDefaultValue(array &$element);