function Custom::preRenderCustomForm
Same name in other branches
- 9 core/modules/views/src/Plugin/views/field/Custom.php \Drupal\views\Plugin\views\field\Custom::preRenderCustomForm()
- 10 core/modules/views/src/Plugin/views/field/Custom.php \Drupal\views\Plugin\views\field\Custom::preRenderCustomForm()
- 11.x core/modules/views/src/Plugin/views/field/Custom.php \Drupal\views\Plugin\views\field\Custom::preRenderCustomForm()
Prerender function to move the textarea to the top of a form.
Parameters
array $form: The form build array.
Return value
array The modified form build array.
File
-
core/
modules/ views/ src/ Plugin/ views/ field/ Custom.php, line 84
Class
- Custom
- A handler to provide a field that is completely custom by the administrator.
Namespace
Drupal\views\Plugin\views\fieldCode
public function preRenderCustomForm($form) {
$form['text'] = $form['alter']['text'];
$form['help'] = $form['alter']['help'];
unset($form['alter']['text']);
unset($form['alter']['help']);
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.