Textfield
Simple textfield input.
Value
Returns string
$value = fx_get_meta('id');
Example
'id' => [
'type' => 'textfield',
'className' => 'my-class-name',
'label' => 'Enter something below',
'placeholder' => '...',
'readOnly' => false,
'title' => 'Description',
],
Props
className
Metabox class name
type: string
inputType
Type of input, e.g. text, number, email
type: string
defaultValue: 'text'
label
Optional label that appears next to the input, rather than ontop
type: string
placeholder
Placeholder text for the input
type: string
readOnly
Disable editing of the input
type: bool
defaultValue: false
title
Metabox title
type: string