IntroductionExampleUses
Introduction
The hidden type field, part of the Settings API, renders a hidden input.
Example
The HTML is created for the hidden field and you will see it if you view the page』s HTML source.
array(
'title' => esc_html__( 'This is the title for Section 4', 'sometextdomain' ),
'fields' => array(
array(
'type' => 'hidden',
'name' => 'myhiddenfield',
'label' => esc_html__( 'This is my hidden field', 'sometextdomain' ),
'default_value' => 'textformyhiddenfield',
),
),
),
The HTML code generated for the hidden field will look similar to the following:
Uses
settings_hidden()