class-evf-field-address.php
1 year ago
class-evf-field-ai.php
1 year ago
class-evf-field-captcha.php
3 weeks ago
class-evf-field-checkbox.php
2 months ago
class-evf-field-color.php
3 weeks ago
class-evf-field-country.php
2 months ago
class-evf-field-credit-card.php
3 weeks ago
class-evf-field-date-time.php
3 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
3 weeks ago
class-evf-field-number.php
1 year ago
class-evf-field-password.php
3 weeks ago
class-evf-field-payment-authorize-net.php
3 weeks ago
class-evf-field-payment-checkbox.php
3 weeks ago
class-evf-field-payment-coupon.php
3 weeks ago
class-evf-field-payment-gateway-selector.php
3 weeks ago
class-evf-field-payment-quantity.php
3 weeks ago
class-evf-field-payment-radio.php
3 weeks ago
class-evf-field-payment-single.php
3 weeks ago
class-evf-field-payment-square.php
1 year ago
class-evf-field-payment-subscription-plan.php
3 weeks ago
class-evf-field-payment-subtotal.php
3 weeks ago
class-evf-field-payment-total.php
3 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
3 weeks ago
class-evf-field-radio.php
2 months ago
class-evf-field-range-slider.php
3 weeks ago
class-evf-field-rating.php
2 months ago
class-evf-field-recaptcha.php
4 months ago
class-evf-field-repeater.php
3 weeks ago
class-evf-field-reset.php
3 weeks ago
class-evf-field-scale-rating.php
1 year ago
class-evf-field-select.php
1 year ago
class-evf-field-signature.php
3 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
3 weeks ago
class-evf-field-progress.php
74 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Progress field |
| 4 | * |
| 5 | * @package EverestForms\Fields |
| 6 | * @since 1.9.4 |
| 7 | */ |
| 8 | |
| 9 | defined( 'ABSPATH' ) || exit; |
| 10 | |
| 11 | /** |
| 12 | * EVF_Field_Progress 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, processing) |
| 17 | * lives in Everest Forms Pro, whose class loads in place of this one when the |
| 18 | * plugin is active (this file is only autoloaded when that class is not already |
| 19 | * defined). Keep `is_pro = true` so the field stays locked. |
| 20 | */ |
| 21 | class EVF_Field_Progress extends EVF_Form_Fields { |
| 22 | |
| 23 | /** |
| 24 | * Constructor. |
| 25 | */ |
| 26 | public function __construct() { |
| 27 | $this->name = esc_html__( 'Progress', 'everest-forms' ); |
| 28 | $this->type = 'progress'; |
| 29 | $this->icon = 'evf-icon evf-icon-progress'; |
| 30 | $this->order = 200; |
| 31 | $this->group = 'advanced'; |
| 32 | $this->is_pro = true; |
| 33 | $this->links = array( |
| 34 | 'image_id' => '', |
| 35 | 'vedio_id' => 'yVlmlVU4Gyk', |
| 36 | ); |
| 37 | $this->settings = array( |
| 38 | 'basic-options' => array( |
| 39 | 'field_options' => array( |
| 40 | 'label', |
| 41 | 'description', |
| 42 | ), |
| 43 | ), |
| 44 | 'advanced-options' => array( |
| 45 | 'field_options' => array( |
| 46 | 'meta', |
| 47 | 'label_hide', |
| 48 | 'css', |
| 49 | ), |
| 50 | ), |
| 51 | ); |
| 52 | |
| 53 | parent::__construct(); |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Field preview inside the builder. |
| 58 | * |
| 59 | * @since 1.0.0 |
| 60 | * |
| 61 | * @param array $field Field data and settings. |
| 62 | */ |
| 63 | public function field_preview( $field ) { |
| 64 | // Label. |
| 65 | $this->field_preview_option( 'label', $field ); |
| 66 | |
| 67 | // Primary input. |
| 68 | echo '<progress value="0" max="100"></progress><span class="evf-progress-percentage">0%</span>'; |
| 69 | |
| 70 | // Description. |
| 71 | $this->field_preview_option( 'description', $field ); |
| 72 | } |
| 73 | } |
| 74 |