text
field type to store a single line text field
Create a text
field type using
You appear to be a bot. Output may be restricted
bw_dtt( "_oikp_slug", "plugin folder name (e.g. oik)" ); bw_register_field( "_oikp_slug", "text", "Plugin slug", array( '#hint' => "_oikp_slug" ) ); bw_register_field_for_object_type( "_oikp_slug", "oik-plugins" );
Form display
When displayed in the Fields meta box or [bw_new] it appears like this.bw_fields display
When displayed by [bw_fields] it appears like this.Notes
In this example the #hint option is used to append the some text to the field label when displayed on the form. The text is only localized when required.Related
- bw_dtt() – Register some text for localization as deferred translatable text
- bw_form_field() – Display a field in a form for the user to enter/choose a value
- bw_theme_field_text() – Theme a field of type ‘text’