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

Breadcrumb

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

function 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\field

Code

public function preRenderCustomForm($form) {
    $form['text'] = $form['alter']['text'];
    $form['help'] = $form['alter']['help'];
    unset($form['alter']['text']);
    unset($form['alter']['help']);
    return $form;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal