public function Range::preview in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/Range.php \Drupal\webform\Plugin\WebformElement\Range::preview()
Generate a renderable preview of the element.
Return value
array A renderable preview of the element.
Overrides WebformElementBase::preview
1 method overrides Range::preview()
- WebformRating::preview in src/
Plugin/ WebformElement/ WebformRating.php - Generate a renderable preview of the element.
File
- src/
Plugin/ WebformElement/ Range.php, line 169
Class
- Range
- Provides a 'range' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function preview() {
return parent::preview() + [
'#min' => 0,
'#max' => 100,
'#step' => 1,
'#output' => 'below',
'#output__field_prefix' => '$',
'#output__field_suffix' => '.00',
];
}