Element_Type::add_placeholder_settings_field( string $section = 'settings' )

Adds a settings field for specifying the element placeholder.

Description

See also

Parameters

$section

(string) (Optional) Settings section the settings field should be part of.

Default value: 'settings'

Source

File: src/db-objects/elements/element-types/element-type.php

	protected function add_placeholder_settings_field( $section = 'settings' ) {
		$this->settings_fields['placeholder'] = array(
			'section'       => $section,
			'type'          => 'text',
			'label'         => __( 'Placeholder', 'torro-forms' ),
			'description'   => __( 'Placeholder text will be shown until data is being entered.', 'torro-forms' ),
			'input_classes' => array( 'regular-text' ),
		);
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.