PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
wpforms
/
pro
/
includes
/
fields
<?php /** * Hidden text field. * * @since 1.0.0 */ class WPForms_Field_Hidden extends WPForms_Field { /** * Primary class constructor. * * @since 1.0.0 */ public function init() { // Define field type information. $this->name = esc_html__( 'Hidden Field', 'wpforms' ); $this->type = 'hidden'; $this->icon = 'fa-eye-slash'; $this->order = 150; $this->group = 'fancy'; } /** * Field options panel inside the builder. * * @since 1.0.0 * * @param array $field Field data and settings. */ public function field_options( $field ) { /* * Basic field options. */ // Options open markup. $args = [ 'markup' => 'open', ]; $this->field_option( 'basic-options', $field, $args ); // Label. $this->field_option( 'label', $field ); // Set label to disabled. $args = [ 'type' => 'hidden', 'slug' => 'label_disable', 'value' => '1', ]; $this->field_element( 'text', $field, $args ); // Default value. $this->field_option( 'default_value', $field ); // Custom CSS classes. $this->field_option( 'css', $field ); // Options close markup. $args = [ 'markup' => 'close', ]; $this->field_option( 'basic-options', $field, $args ); } /** * Field preview inside the builder. * * @since 1.0.0 * * @param array $field Field data and settings. */ public function field_preview( $field ) { // Label. $this->field_preview_option( 'label', $field ); // Primary input. echo '<input type="text" class="primary-input" readonly>'; } /** * Field display on the form front-end. * * @since 1.0.0 * * @param array $field Field data and settings. * @param array $deprecated Not used any more field attributes. * @param array $form_data Form data and settings. */ public function field_display( $field, $deprecated, $form_data ) { // Define data. $primary = $field['properties']['inputs']['primary']; // Primary field. printf( '<input type="hidden" %s>', wpforms_html_attributes( $primary['id'], $primary['class'], $primary['data'], $primary['attr'] ) ); } } new WPForms_Field_Hidden();
[-] class-phone.php
[edit]
[-] class-payment-total.php
[edit]
[-] class-payment-credit-card.php
[edit]
[-] class-address.php
[edit]
[+]
..
[-] class-date-time.php
[edit]
[-] class-hidden.php
[edit]
[-] class-page-break.php
[edit]
[-] class-divider.php
[edit]
[-] class-html.php
[edit]
[-] class-payment-checkbox.php
[edit]
[-] class-payment-dropdown.php
[edit]
[-] class-payment-multiple.php
[edit]
[-] class-rating.php
[edit]
[-] class-url.php
[edit]
[-] class-password.php
[edit]
[-] class-file-upload.php
[edit]
[-] class-payment-single.php
[edit]