PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 3.5.2
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v3.5.2
3.5.2 3.5.1 3.5.0 3.4.8 3.4.7 3.4.6 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 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.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.6.1 1.6.7 1.7.0 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.2 1.7.2.1 1.7.2.2 1.7.3 1.7.4 1.7.5 1.7.5.1 1.7.5.2 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.8.0 1.8.0.1 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.0.1 1.9.1 1.9.2 1.9.3 1.9.4 1.9.4.1 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.0.1 2.0.1 2.0.2 2.0.3 2.0.3.1 2.0.4 2.0.4.1 2.0.5 2.0.6 2.0.7 2.0.8 2.0.8.1 2.0.9 3.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.3.1 3.0.4 3.0.4.1 3.0.4.2 3.0.5 3.0.5.1 3.0.5.2 3.0.6 3.0.6.1 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.0.9.1 3.0.9.2 3.0.9.3 3.0.9.4 3.0.9.5 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.2.1 3.4.3 3.4.4 3.4.5 trunk 1.0 1.0.1 1.0.2 1.0.3
everest-forms / includes / fields / class-evf-field-color.php
everest-forms / includes / fields Last commit date
class-evf-field-address.php 1 year ago class-evf-field-ai.php 1 year ago class-evf-field-captcha.php 4 weeks ago class-evf-field-checkbox.php 2 months ago class-evf-field-color.php 4 weeks ago class-evf-field-country.php 2 months ago class-evf-field-credit-card.php 4 weeks ago class-evf-field-date-time.php 4 weeks ago class-evf-field-divider.php 2 years ago class-evf-field-email.php 1 year ago class-evf-field-file-upload.php 1 year ago class-evf-field-first-name.php 1 year ago class-evf-field-hcaptcha.php 4 months ago class-evf-field-hidden.php 1 year ago class-evf-field-html.php 9 months ago class-evf-field-image-upload.php 1 year ago class-evf-field-last-name.php 1 year ago class-evf-field-likert.php 1 year ago class-evf-field-lookup.php 4 weeks ago class-evf-field-number.php 1 year ago class-evf-field-password.php 4 weeks ago class-evf-field-payment-authorize-net.php 4 weeks ago class-evf-field-payment-checkbox.php 4 weeks ago class-evf-field-payment-coupon.php 4 weeks ago class-evf-field-payment-gateway-selector.php 4 weeks ago class-evf-field-payment-quantity.php 4 weeks ago class-evf-field-payment-radio.php 4 weeks ago class-evf-field-payment-single.php 4 weeks ago class-evf-field-payment-square.php 1 year ago class-evf-field-payment-subscription-plan.php 4 weeks ago class-evf-field-payment-subtotal.php 4 weeks ago class-evf-field-payment-total.php 4 weeks ago class-evf-field-phone.php 1 year ago class-evf-field-privacy-policy.php 2 months ago class-evf-field-private-note.php 1 year ago class-evf-field-progress.php 4 weeks ago class-evf-field-radio.php 2 months ago class-evf-field-range-slider.php 4 weeks ago class-evf-field-rating.php 2 months ago class-evf-field-recaptcha.php 4 months ago class-evf-field-repeater.php 4 weeks ago class-evf-field-reset.php 4 weeks ago class-evf-field-scale-rating.php 1 year ago class-evf-field-select.php 1 year ago class-evf-field-signature.php 4 weeks ago class-evf-field-text.php 1 year ago class-evf-field-textarea.php 1 year ago class-evf-field-title.php 2 years ago class-evf-field-turnstile.php 4 months ago class-evf-field-url.php 1 year ago class-evf-field-wysiwyg.php 2 months ago class-evf-field-yes-no.php 1 year ago payment-amount-helpers.php 4 weeks ago
class-evf-field-color.php
123 lines
1 <?php
2 /**
3 * Color field
4 *
5 * @package EverestForms\Fields
6 * @since 1.9.6
7 */
8
9 defined( 'ABSPATH' ) || exit;
10
11 /**
12 * EVF_Field_Color Class.
13 *
14 * Builder-scope (read-only) version shipped in the free plugin so the field can
15 * be shown LOCKED — with its real preview and readable settings — for the AI
16 * upsell. The full functional implementation (front-end display, validation,
17 * processing, exporters) lives in Everest Forms Pro, whose class loads in place
18 * of this one when the plugin is active (this file is only autoloaded when that
19 * class is not already defined). Keep `is_pro = true` so the field stays locked.
20 */
21 class EVF_Field_Color extends EVF_Form_Fields {
22
23 /**
24 * Constructor.
25 */
26 public function __construct() {
27 $this->name = esc_html__( 'Color', 'everest-forms' );
28 $this->type = 'color';
29 $this->icon = 'evf-icon evf-icon-color';
30 $this->order = 210;
31 $this->group = 'advanced';
32 $this->is_pro = true;
33 $this->links = array(
34 'image_id' => '',
35 'vedio_id' => 'M9Rb0RWrf2I',
36 );
37 $this->settings = array(
38 'basic-options' => array(
39 'field_options' => array(
40 'label',
41 'description',
42 'required',
43 'required_field_message_setting',
44 'required_field_message',
45 ),
46 ),
47 'advanced-options' => array(
48 'field_options' => array(
49 'placeholder',
50 'meta',
51 'default_color',
52 'label_hide',
53 'css',
54 ),
55 ),
56 );
57
58 parent::__construct();
59 }
60
61 /**
62 * Color field default value option.
63 *
64 * @param array $field Field settings.
65 */
66 public function default_color( $field ) {
67
68 $lbl = $this->field_element(
69 'label',
70 $field,
71 array(
72 'slug' => 'default',
73 'value' => esc_html__( 'Default Color', 'everest-forms' ),
74 'tooltip' => esc_html__( 'Choose the default color selected in the field.', 'everest-forms' ),
75 ),
76 false
77 );
78 $fld = $this->field_element(
79 'text',
80 $field,
81 array(
82 'slug' => 'default',
83 'value' => ! empty( $field['default'] ) ? esc_attr( $field['default'] ) : '#000000',
84 'class' => 'evf-colorpicker',
85 'data' => array(
86 'default-color' => '#000000',
87 ),
88 ),
89 false
90 );
91 $this->field_element(
92 'row',
93 $field,
94 array(
95 'slug' => 'default',
96 'content' => $lbl . $fld,
97 )
98 );
99 }
100
101 /**
102 * Field preview inside the builder.
103 *
104 * @since 1.6.1
105 *
106 * @param array $field Field data and settings.
107 */
108 public function field_preview( $field ) {
109
110 // Define data.
111 $default = ! empty( $field['default'] ) ? esc_attr( $field['default'] ) : '#000000';
112
113 // Label.
114 $this->field_preview_option( 'label', $field );
115
116 // Primary input.
117 echo '<div class="evf-color-picker-bg" style="background: ' . esc_attr( $default ) . ';"></div><input type="text" class="widefat colorpickpreview" disabled>';
118
119 // Description.
120 $this->field_preview_option( 'description', $field );
121 }
122 }
123