TRUE, '#pre_render' => [ [$class, 'preRenderHidden'], ], '#theme' => 'input__hidden', ]; } /** * {@inheritdoc} */ public static function valueCallback(&$element, $input, FormStateInterface $form_state) { if ($input !== FALSE && $input !== NULL) { // This should be a string, but allow other scalars since they might be // valid input in programmatic form submissions. return is_scalar($input) ? (string) $input : ''; } return NULL; } }