PluginProbe
Hash Form – Drag & Drop Form Builder / trunk
Hash Form – Drag & Drop Form Builder vtrunk
1.4.4 1.4.3 1.4.2 1.4.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.6.1 1.2.7 1.2.8 1.2.9 1.3.0 All 47 releases
hash-form / includes / fields / HashFormFieldTextarea.php

HashFormFieldTextarea.php in Hash Form – Drag & Drop Form Builder trunk, at includes/fields/HashFormFieldTextarea.php

35 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined('ABSPATH') || die();
3
4 class HashFormFieldTextarea extends HashFormFieldType {
5
6 protected $type = 'textarea';
7
8 protected function field_settings_for_type() {
9 return array(
10 'advanced_validation' => true,
11 'value' => false,
12 'clear_on_focus' => true
13 );
14 }
15
16 protected function extra_field_default_opts() {
17 return array(
18 'rows' => '10',
19 );
20 }
21
22 public function sanitize_value(&$value) {
23 return HashFormHelper::sanitize_value('esc_textarea', $value);
24 }
25
26 protected function input_html() {
27 $field = $this->get_field();
28 $value = $this->prepare_esc_value();
29 ?>
30 <textarea <?php $this->field_attrs(); ?> rows="<?php echo isset($field['rows']) ? absint($field['rows']) : 10; ?>"><?php echo esc_textarea(apply_filters('hashform_translate_string', $value, 'Hash Form', HashFormBuilder::get_form_title($field['form_id']) . ' - ' . $field['id'] . ' - ' . 'Field Default')); ?></textarea>
31 <?php
32 }
33
34 }
35