Plugin Directory

Changeset 3102675


Ignore:
Timestamp:
06/14/2024 10:03:12 AM (18 months ago)
Author:
themeies
Message:

Bug fixed
Code improved

Location:
formit
Files:
174 added
7 edited

Legend:

Unmodified
Added
Removed
  • formit/trunk/README.md

    r3099772 r3102675  
    44![Formit Logo](assets/img/logo-white.svg)
    55
    6 [![Version](https://img.shields.io/badge/version-2.1.3-blue.svg)]([https://github.com/xirosoft/formit/blob/master/CHANGELOG.md#v100](https://github.com/Xirosoft/formit/blob/main/CHANGELOG.md#v2.1.0))
     6[![Version](https://img.shields.io/badge/version-2.1.4-blue.svg)]([https://github.com/xirosoft/formit/blob/master/CHANGELOG.md#v100](https://github.com/Xirosoft/formit/blob/main/CHANGELOG.md#v2.1.0))
    77[![License](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
    88[![Build Status](https://img.shields.io/travis/xirosoft/formit/master.svg)](https://travis-ci.org/xirosoft/formit)
  • formit/trunk/assets/admin/js/formit-admin-scripts.js

    r3099772 r3102675  
    4343        {label: "Time", type: "date", subtype: "time", icon:"<i class='formbuilder-icon-clock'></i> "},
    4444    ];
    45     const preBuilderFields = ['autocomplete', 'button', 'checkbox-group', 'date', 'file', 'header', 'hidden', 'number', 'paragraph', 'radio-group', 'select', 'text', 'textarea', 'button'];
    46     const preBuilderAttrs = ['access', 'className', 'description', 'inline', 'label', 'max', 'maxlength', 'min', 'multiple', 'name', 'options', 'other', 'placeholder', 'required', 'rows', 'step', 'style', 'subtype', 'toggle', 'value'];
    47     let disableFields = ['autocomplete', 'file', 'hidden'];
    48     let disabledAttrs = ['access', 'description', 'inline', 'multiple', 'name', 'other', 'rows', 'step', 'maxlength', 'style', 'toggle'];
     45    const preBuilderFields  = ['autocomplete', 'button', 'checkbox-group', 'date', 'file', 'header', 'hidden', 'number', 'paragraph', 'radio-group', 'select', 'text', 'textarea'];
     46    const preBuilderAttrs   = ['access', 'className', 'description', 'inline', 'label', 'max', 'maxlength', 'min', 'multiple', 'name', 'options', 'other', 'placeholder', 'required', 'rows', 'step', 'style', 'subtype', 'toggle', 'value'];
     47    let disableFields       = ['autocomplete', 'file', 'hidden'];
     48    let disabledAttrs       = ['access', 'description', 'inline', 'multiple', 'name', 'other', 'rows', 'step', 'maxlength', 'style', 'toggle'];
    4949
    5050   
  • formit/trunk/formit.php

    r3099772 r3102675  
    44 * Description: A Formit drag and drop streamlines complex online forms, aiding web developers and businesses by structuring data collection into user-friendly steps.
    55 * Plugin URI: https://themeies.com/item/formit
    6  * Version: 2.1.3
     6 * Version: 2.1.4
    77 * Requires at least: 6.0
    88 * Requires PHP: 7.4
     
    4040     * @var string The plugin version.
    4141     */
    42     const Formit_Version = '2.1.3';
     42    const Formit_Version = '2.1.4';
    4343
    4444    /**
  • formit/trunk/inc/Admin/Formit_FromBuilderHandle.php

    r3099772 r3102675  
    160160                    'class' => true,
    161161                ),
     162                'option' => array(
     163                    'selected' => true,
     164                    'value' => true,
     165                ),
    162166                'textarea' => array(
    163167                    'type' => true,
  • formit/trunk/inc/Admin/views/Settings/Formit_SettingConfig.php

    r3099772 r3102675  
    114114        */
    115115        function formit_setting_tab(){
    116             // Default SettingsArray
     116            // Default SettingsArray.
    117117            $pre_defined_settings = array(
    118118                'form_option_checkbox-group' => false,
     119                'form_option_button' => false,
    119120                'form_option_date' => false,
    120121                'form_option_files' => false,
     
    127128                'form_option_text' => false,
    128129                'form_option_textarea' => false,
    129                 'form_attr_description' => false,
     130                'form_attr_description' => false, // Attribute start from here.
    130131                'form_attr_name' => false,
    131132                'form_attr_options' => true,
     
    146147
    147148            $form_elements_array = array(
     149                array(
     150                    'name' => 'form_option_button',
     151                    'label' => 'Button Control 🔘',
     152                    'desc' => 'The "Button Control" in Form Builder lets users submit the form by clicking the button.',
     153                    'value' => $SettingsArray['form_option_button'] ? true : false,
     154                    'disabled' => false
     155                ),
    148156                array(
    149157                    'name' => 'form_option_checkbox-group',
  • formit/trunk/inc/Frontend/Formit_ShortCode.php

    r3099772 r3102675  
    3434            // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
    3535            $result = $wpdb->get_row($wpdb->prepare($query, $table_name, $post_id));
     36            $allowed_tags = array(
     37                'div' => array(
     38                    'class' => true,
     39                    'id' => true,
     40                ),
     41                'span' => array(),
     42                'label' => array(
     43                    'for' => true,
     44                ),
     45                'strong' => array(),
     46                'p' => array(),
     47                'h1' => array(),
     48                'h2' => array(),
     49                'h3' => array(),
     50                'h4' => array(),
     51                'h5' => array(),
     52                'h6' => array(),
     53                'select' => array(
     54                    'type' => true,
     55                    'name' => true,
     56                    'id'   => true,
     57                    'class' => true,
     58                ),
     59                'option' => array(
     60                    'selected' => true,
     61                    'value' => true,
     62                ),
     63                'textarea' => array(
     64                    'type' => true,
     65                    'name' => true,
     66                    'id'   => true,
     67                    'class' => true,
     68                ),
     69                'form' => array(
     70                    'action' => true,
     71                    'method' => true,
     72                ),
     73                'input' => array(
     74                    'type' => true,
     75                    'name' => true,
     76                    'id'   => true,
     77                    'class' => true,
     78                ),
     79                'button' => array(
     80                    'type' => true,
     81                    'id'   => true,
     82                    'class' => true,
     83                ),
     84            );
    3685
    3786            if ($post_id !== null && $result !== null) {
     
    4796                    <input type="hidden" name="formit_id" id="formit_id" value="' . esc_attr($result->id) . '">
    4897                    <input type="hidden" name="post_id" id="post_id" value="' . esc_attr($post_id) . '">
    49                     <input type="hidden" name="formit_name" id="formit_name" value="' . esc_attr($result->form_title) . '">' . wp_kses_post(stripslashes($result->form_html)) . '</form>
     98                    <input type="hidden" name="formit_name" id="formit_name" value="' . esc_attr($result->form_title) . '">' . wp_kses(stripslashes($result->form_html), $allowed_tags) . '</form>
    5099                    <div class="xiroform-circle"></div>
    51100                    <div class="xiroform-msg"></div>';
  • formit/trunk/readme.txt

    r3099787 r3102675  
    66Tested up to: 6.5
    77Requires PHP: 7.4
    8 Stable tag: 2.1.3
     8Stable tag: 2.1.4
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.