Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > forminator > library > fields > >
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
address.php | File | 27845 bytes | July 14 2025 15:42:34. | |
calculation.php | File | 8270 bytes | March 03 2025 16:08:12. | |
captcha.php | File | 9379 bytes | April 14 2025 14:55:34. | |
consent.php | File | 6209 bytes | July 14 2025 15:42:34. | |
currency.php | File | 13254 bytes | July 14 2025 15:42:34. | |
custom.php | File | 7305 bytes | March 03 2025 16:08:12. | |
date.php | File | 45471 bytes | July 14 2025 15:42:34. | |
email.php | File | 14373 bytes | July 14 2025 15:42:34. | |
gdprcheckbox.php | File | 5432 bytes | July 14 2025 15:42:34. | |
group.php | File | 7233 bytes | July 14 2025 15:42:34. | |
hidden.php | File | 5010 bytes | April 14 2025 14:55:34. | |
html.php | File | 2470 bytes | July 14 2025 15:42:34. | |
multivalue.php | File | 16995 bytes | July 14 2025 15:42:34. | |
name.php | File | 22554 bytes | July 14 2025 15:42:34. | |
number.php | File | 13488 bytes | July 14 2025 15:42:34. | |
page-break.php | File | 1514 bytes | December 24 2024 20:31:58. | |
password.php | File | 18982 bytes | July 14 2025 15:42:34. | |
paypal.php | File | 13706 bytes | December 24 2024 20:31:58. | |
phone.php | File | 15768 bytes | July 14 2025 15:42:34. | |
postdata.php | File | 36756 bytes | July 14 2025 15:42:34. | |
radio.php | File | 17476 bytes | July 14 2025 15:42:34. | |
rating.php | File | 5749 bytes | July 14 2025 15:42:34. | |
section.php | File | 3194 bytes | December 24 2024 20:31:58. | |
select.php | File | 23804 bytes | July 14 2025 15:42:34. | |
slider.php | File | 14350 bytes | July 14 2025 15:42:34. | |
stripe-payment-element.php | File | 4076 bytes | April 14 2025 14:55:34. | |
stripe.php | File | 46882 bytes | April 16 2025 18:18:24. | |
text.php | File | 11490 bytes | July 14 2025 15:42:34. | |
textarea.php | File | 11887 bytes | July 14 2025 15:42:34. | |
time.php | File | 29459 bytes | July 14 2025 15:42:34. | |
upload.php | File | 34058 bytes | July 14 2025 15:42:34. | |
website.php | File | 8324 bytes | July 14 2025 15:42:34. |
<?php /** * The Forminator_Group class. * * @package Forminator */ if ( ! defined( 'ABSPATH' ) ) { die(); } /** * Class Forminator_Group */ class Forminator_Group extends Forminator_Field { /** * Default field title * * @var string */ public $name = ''; /** * Slug * * @var string */ public $slug = 'group'; /** * Type * * @var string */ public $type = 'group'; /** * Position this field type on Add Field popup * * @var int */ public $position = 26; /** * Options * * @var array */ public $options = array(); /** * Icon CSS class * * @var string */ public $icon = 'sui-icon forminator-icon-group'; /** * Forminator_Group constructor. */ public function __construct() { parent::__construct(); $this->name = esc_html__( 'Field Group', 'forminator' ); } /** * Field defaults * * @return array */ public function defaults() { return array( 'field_label' => esc_html__( 'Field Group', 'forminator' ), 'is_repeater' => 'true', ); } /** * Autofill Setting * * @param array $settings Field settings. * * @return array */ public function autofill_settings( $settings = array() ) { // Unsupported Autofill. $autofill_settings = array(); return $autofill_settings; } /** * Field front-end markup * * @param array $field Field. * @param Forminator_Render_Form $views_obj Forminator_Render_Form object. * * @return mixed */ public function markup( $field, $views_obj ) { $name = self::get_property( 'element_id', $field ); $wrappers = $views_obj::get_grouped_wrappers( $name ); $options = self::prepare_field_options( $field ); $settings = $views_obj->model->settings; $html = ''; if ( ! empty( $field['field_label'] ) ) { $html .= sprintf( '<label class="forminator-label forminator-repeater-label">%s</label>', self::convert_markdown( esc_html( $field['field_label'] ) ) ); } $description = self::get_property( 'description', $field ); $descr_position = self::get_description_position( $field, $settings ); if ( ! empty( $description ) && 'above' === $descr_position ) { $html .= apply_filters( 'forminator_field_description', sprintf( '<span class="forminator-description forminator-repeater-description">%s</span>', self::convert_markdown( self::esc_description( $description, $name ) ) ), $description, $name, $descr_position ); } $html .= '<div class="forminator-all-group-copies' . ( ! empty( $field['group_styles'] ) && 'custom' === $field['group_styles'] ? '' : ' forminator-repeater-field' ) . '">'; $i = 1; do { $html .= '<div class="forminator-grouped-fields" data-options="' . esc_attr( wp_json_encode( $options ) ) . '">'; if ( 1 < $i ) { $wrappers = array_map( function ( $wrapper ) use ( $i ) { if ( empty( $wrapper['fields'] ) ) { return $wrapper; } $wrapper['fields'] = array_map( function ( $field ) use ( $i ) { $field['group_suffix'] = '-' . $i; return $field; }, $wrapper['fields'] ); return $wrapper; }, $wrappers ); $html .= '<input name="' . esc_attr( $name ) . '-copies[]" type="hidden" value="' . intval( $i ) . '" />'; } $html .= $views_obj->render_wrappers( $wrappers ); if ( $options['is_repeater'] && ( 'custom' !== $options['min_type'] || 'custom' !== $options['max_type'] || $options['max'] > $options['min'] ) ) { $html .= self::render_action_buttons( $options ); } $html .= '</div>'; } while ( ! empty( $views_obj->draft_data[ $name . '-copies' ] ) && $views_obj->draft_data[ $name . '-copies' ]['value'] >= ( ++$i ) ); $html .= '</div>'; if ( 'above' !== $descr_position ) { $html .= apply_filters( 'forminator_field_description', self::get_description( $description, $name, $descr_position ), $description, $name, $descr_position ); } return $html; } /** * Prepare field options * * @param array $field Field options. * @return array */ private static function prepare_field_options( $field ) { $min_limit_type = empty( $field['min_limit_type'] ) || 'variable' !== $field['min_limit_type'] ? 'custom' : $field['min_limit_type']; $max_limit_type = empty( $field['max_limit_type'] ) || 'variable' !== $field['max_limit_type'] ? 'custom' : $field['max_limit_type']; if ( 'custom' === $min_limit_type ) { $min = empty( $field['min_limit'] ) || 1 > intval( $field['min_limit'] ) ? 1 : intval( $field['min_limit'] ); } else { $min = empty( $field['min_limit_field'] ) ? 1 : $field['min_limit_field']; } if ( 'custom' === $max_limit_type ) { $max = empty( $field['max_limit'] ) || 1 > intval( $field['max_limit'] ) ? PHP_INT_MAX : intval( $field['max_limit'] ); } else { $max = empty( $field['max_limit_field'] ) ? PHP_INT_MAX : $field['max_limit_field']; } return array( 'is_repeater' => empty( $field['is_repeater'] ) || 'true' === $field['is_repeater'], 'min_type' => $min_limit_type, 'max_type' => $max_limit_type, 'min' => $min, 'max' => $max, 'add_text' => empty( $field['add_action_text'] ) ? esc_html__( 'Add item', 'forminator' ) : $field['add_action_text'], 'remove_text' => empty( $field['remove_action_text'] ) ? esc_html__( 'Remove item', 'forminator' ) : $field['remove_action_text'], 'action_element_type' => empty( $field['action_element_type'] ) ? 'button' : $field['action_element_type'], ); } /** * Get Repeater actions * * @param array $options Field options. * @return string */ private static function render_action_buttons( $options ) { $html = '<div class="forminator-row forminator-action-buttons">'; $html .= '<div class="forminator-col forminator-col-12">'; if ( 'icon' === $options['action_element_type'] ) { // Icons. $html .= '<button class="forminator-repeater-action-icon forminator-repeater-add"><span class="forminator-icon-add" aria-hidden="true"></span><span class="sui-screen-reader-text">' . esc_html( $options['add_text'] ) . '</span></button>'; $html .= '<button class="forminator-repeater-action-icon forminator-repeater-remove"><span class="forminator-icon-remove" aria-hidden="true"></span><span class="sui-screen-reader-text">' . esc_html( $options['remove_text'] ) . '</span></button>'; } elseif ( 'link' === $options['action_element_type'] ) { // Links. $html .= '<a href="#" class="forminator-repeater-action-link forminator-repeater-add">' . esc_html( $options['add_text'] ) . '</a>'; $html .= '<a href="#" class="forminator-repeater-action-link forminator-repeater-remove">' . esc_html( $options['remove_text'] ) . '</a>'; } else { // Buttons. $html .= '<input type="button" value="' . esc_attr( $options['add_text'] ) . '" class="forminator-repeater-action-button forminator-repeater-add" />'; $html .= '<input type="button" value="' . esc_attr( $options['remove_text'] ) . '" class="forminator-repeater-action-button forminator-repeater-remove" />'; } $html .= '</div>'; $html .= '</div>'; return $html; } }
SILENT KILLER Tool