Server IP : 104.21.38.3 / Your IP : 172.71.81.93 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/lapma.in/wp-content/plugins/everest-forms/includes/fields/ |
Upload File : |
<?php /** * URL field. * * @package EverestForms\Fields * @since 1.0.0 */ defined( 'ABSPATH' ) || exit; /** * EVF_Field_URL class. */ class EVF_Field_URL extends EVF_Form_Fields { /** * Constructor. */ public function __construct() { $this->name = esc_html__( 'Website / URL', 'everest-forms' ); $this->type = 'url'; $this->icon = 'evf-icon evf-icon-website'; $this->order = 10; $this->group = 'advanced'; $this->settings = array( 'basic-options' => array( 'field_options' => array( 'label', 'description', 'required', 'required_field_message_setting', 'required_field_message', ), ), 'advanced-options' => array( 'field_options' => array( 'placeholder', 'meta', 'label_hide', 'default_value', 'css', 'regex_validation', 'regex_value', 'regex_message', ), ), ); parent::__construct(); } /** * Field preview inside the builder. * * @since 1.0.0 * * @param array $field Field data and settings. */ public function field_preview( $field ) { // Define data. $placeholder = ! empty( $field['placeholder'] ) ? esc_attr( $field['placeholder'] ) : ''; // Label. $this->field_preview_option( 'label', $field ); // Primary input. echo '<input type="url" placeholder="' . esc_attr( $placeholder ) . '" class="widefat" disabled>'; // Description. $this->field_preview_option( 'description', $field ); } /** * Field display on the form front-end. * * @since 1.0.0 * * @param array $field Field Data. * @param array $field_atts Field attributes. * @param array $form_data All Form Data. */ public function field_display( $field, $field_atts, $form_data ) { // Define data. $primary = $field['properties']['inputs']['primary']; // Primary field. printf( '<input type="url" %s %s >', evf_html_attributes( $primary['id'], $primary['class'], $primary['data'], $primary['attr'] ), esc_attr( $primary['required'] ) ); } }