Recently I was trying to create a hidden field on a form I’ve been working with and couldn’t find anything in the Drupal documentation that explained how to create a hidden form. The solution is actually quite simple.
In this case I was using the hidden field to store a primary key value.
$form[‘form_group’][‘form_name’] = array(
‘#title’ => t(‘ID’),
‘#value’ => $value,
‘#type’ => ‘hidden,
);
It’s as simple as setting the type to hidden.
The Latest
-
Microchip Your Data: Snowflake Column Lineage
28 November, 2023 -
Red Pepper Vodka
22 November, 2023 -
Snowflake Masking Policies Demystified
21 November, 2023