Textarea::get_edit_submission_fields_args( awsmug\Torro_Forms\DB_Objects\Elements\Element $element )

Gets the fields arguments for an element of this type when editing submission values in the admin.

Description

See also

Parameters

$element

(awsmug\Torro_Forms\DB_Objects\Elements\Element) (Required) Element to get fields arguments for.

Return

(array) An associative array of <code>$field_slug => $field_args</code> pairs.

Source

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

	public function get_edit_submission_fields_args( $element ) {
		$fields = parent::get_edit_submission_fields_args( $element );

		$slug = $this->get_edit_submission_field_slug( $element->id );

		$fields[ $slug ]['type'] = 'textarea';

		$settings = $this->get_settings( $element );

		if ( ! empty( $settings['max_length'] ) ) {
			$fields[ $slug ]['maxlength'] = (int) $settings['max_length'];
		}

		if ( ! empty( $settings['rows'] ) ) {
			$fields[ $slug ]['rows'] = (int) $settings['rows'];
		}

		if ( ! empty( $settings['cols'] ) ) {
			$fields[ $slug ]['cols'] = (int) $settings['cols'];
		}

		return $fields;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.