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-private-note.php
67 lines
| 1 | <?php |
| 2 | /** |
| 3 | * First name field. |
| 4 | * |
| 5 | * @package EverestForms\Fields |
| 6 | * @since 3.2.2 |
| 7 | */ |
| 8 | |
| 9 | defined( 'ABSPATH' ) || exit; |
| 10 | |
| 11 | /** |
| 12 | * EVF_Field_First_Name class. |
| 13 | */ |
| 14 | class EVF_Field_Private_Note extends EVF_Form_Fields { |
| 15 | |
| 16 | /** |
| 17 | * Constructor. |
| 18 | */ |
| 19 | public function __construct() { |
| 20 | $this->name = esc_html__( 'Private Note', 'everest-forms' ); |
| 21 | $this->type = 'private-note'; |
| 22 | $this->icon = 'evf-icon evf-icon-private-note'; |
| 23 | $this->order = 91; |
| 24 | $this->group = 'general'; |
| 25 | $this->settings = array( |
| 26 | 'basic-options' => array( |
| 27 | 'field_options' => array( |
| 28 | 'label', |
| 29 | 'description', |
| 30 | 'meta', |
| 31 | ), |
| 32 | ) |
| 33 | ); |
| 34 | |
| 35 | parent::__construct(); |
| 36 | |
| 37 | add_filter( 'everest_forms_should_display_field_' . $this->type, array( $this, 'should_display_field' ), 10, 3 ); |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Should display field. |
| 42 | * |
| 43 | * @since 3.2.2 |
| 44 | */ |
| 45 | public function should_display_field( $should_display, $field, $form_data ) { |
| 46 | if ( isset( $field['type'] ) && $field['type'] === $this->type ) { |
| 47 | return false; |
| 48 | } |
| 49 | return true; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Field preview inside the builder. |
| 54 | * |
| 55 | * @since 3.2.2 |
| 56 | * |
| 57 | * @param array $field Field data and settings. |
| 58 | */ |
| 59 | public function field_preview( $field ) { |
| 60 | |
| 61 | // Label. |
| 62 | $this->field_preview_option( 'label', $field ); |
| 63 | // Description. |
| 64 | $this->field_preview_option( 'description', $field ); |
| 65 | } |
| 66 | } |
| 67 |