Plugin Directory

Changeset 3427184


Ignore:
Timestamp:
12/25/2025 09:26:20 AM (3 months ago)
Author:
bestwebsoft
Message:

"V4.3.6 - * The compatibility with new WordPress version updated. "

Location:
contact-form-plugin
Files:
223 added
5 edited

Legend:

Unmodified
Added
Removed
  • contact-form-plugin/trunk/contact_form.php

    r3395797 r3427184  
    77Text Domain: contact-form-plugin
    88Domain Path: /languages
    9 Version: 4.3.5
     9Version: 4.3.6
    1010Author URI: https://bestwebsoft.com/
    1111License: GPLv2 or later
     
    610610            'attachment_label'        => array( 'default' => __( 'Attachment', 'contact-form-plugin' ) . ':' ),
    611611            'attachment_tooltip'      => array( 'default' => __( 'Supported file types: HTML, TXT, CSS, GIF, PNG, JPEG, JPG, TIFF, BMP, AI, EPS, PS, CSV, RTF, PDF, DOC, DOCX, XLS, XLSX, ZIP, RAR, WAV, MP3, PPT.', 'contact-form-plugin' ) ),
    612             'dropdown_label'          => array( 'default' => __( 'Dropdown', 'contact-form-plugin' ) ),
     612            'dropdown_label'          => array( 'default' => __( 'Dropdown', 'contact-form-plugin' ) . ':'  ),
     613            'esign_label'             => array( 'default' => __( 'E-sign', 'contact-form-plugin' ) . ':'  ),
    613614            'gdpr_label'              => array( 'default' => __( 'I consent to having this site collect my personal data.', 'contact-form-plugin' ) ),
    614615            'gdpr_text_button'        => array( 'default' => __( 'Learn more', 'contact-form-plugin' ) ),
     
    627628            'captcha_error'           => array( 'default' => __( 'Please fill out the CAPTCHA.', 'contact-form-plugin' ) ),
    628629            'dropdown_error'          => array( 'default' => __( 'This field is required.', 'contact-form-plugin' ) ),
     630            'esign_error'             => array( 'default' => __( 'This field is required.', 'contact-form-plugin' ) ),
    629631            'form_error'              => array( 'default' => __( 'Please make corrections below and try again.', 'contact-form-plugin' ) ),
    630632            'send_copy_label'         => array( 'default' => __( 'Send me copy.', 'contact-form-plugin' ) ),
     
    663665            'display_dropdown'        => 0,
    664666            'required_dropdown'       => 0,
     667            'display_esign'           => 0,
     668            'required_esign'          => 0
    665669        );
    666670        $option_defaults = apply_filters( 'cntctfrm_get_additional_options_default', $option_defaults );
     
    914918            'cntctfrm_contact_attachment' => ( 1 === absint( $cntctfrm_options['attachment'] ) ) ? true : false,
    915919            'cntctfrm_contact_dropdown'   => ( 1 === absint( $cntctfrm_options['display_dropdown'] ) ) ? true : false,
     920            'cntctfrm_contact_esign'      => ( 1 === absint( $cntctfrm_options['display_esign'] ) ) ? true : false,
    916921            'cntctfrm_contact_send_copy'  => ( 1 === absint( $cntctfrm_options['send_copy'] ) ) ? true : false,
    917922            'cntctfrm_contact_gdpr'       => ( 1 === absint( $cntctfrm_options['gdpr'] ) ) ? true : false,
     
    13521357                            }
    13531358                            break;
     1359                        case 'cntctfrm_contact_esign':
     1360                            if ( 1 === absint( $cntctfrm_options['display_esign'] ) ) {
     1361                                $content .= '<div class="cntctfrm_field_wrap cntctfrm_field_esign_wrap">';
     1362                                $content .= '<div class="cntctfrm_label cntctfrm_label_esign">
     1363                                    <label for="cntctfrm_contact_name' . $form_countid . '">' . $cntctfrm_options['esign_label'][ $lang ] . ( 1 === absint( $cntctfrm_options['required_esign'] ) ? ' <span class="required">' . $cntctfrm_options['required_symbol'] . '</span></label>' : '</label>' );
     1364                                $content .= '</div>';
     1365                                if ( isset( $cntctfrm_error_message['error_esign'] ) && $cntctfrm_form_count === $form_submited ) {
     1366                                    $content .= '<div class="cntctfrm_error_text">' . $cntctfrm_error_message['error_esign'] . '</div>';
     1367                                }
     1368                                $content .= '<div class="cntctfrm_input cntctfrm_input_esign"><span id="cntctfrm_esign_reset_' . $cntctfrm_form_count . '" class="cntctfrm_esign_reset dashicons dashicons-update"></span><div id="cntctfrm_esign_signature_' . $cntctfrm_form_count . '"></div>                                   
     1369                                    <input type="hidden" name="cntctfrm_esign_image" id="cntctfrm_esign_image_' . $cntctfrm_form_count . '" value="" />
     1370                                    <input type="hidden" name="cntctfrm_esign_start" id="cntctfrm_esign_start_' . $cntctfrm_form_count . '" value="0" />';
     1371                                   
     1372                                $content .='</div></div>';
     1373                            }
     1374                            break;
    13541375                        default:
    13551376                            break;
     
    13901411                            <input type="hidden" value="' . $cntctfrm_form_count . '" name="cntctfrm_form_submited">
    13911412                            <input type="hidden" value="' . $options_name . '" name="cntctfrm_options_name">
    1392                             <input type="submit" value="' . $cntctfrm_options['submit_label'][ $lang ] . '" class="cntctfrm_contact_submit" />
     1413                            <input type="submit" value="' . $cntctfrm_options['submit_label'][ $lang ] . '" class="cntctfrm_contact_submit" id="' . $cntctfrm_form_count . '" />
    13931414                        </div>';
    13941415                }
     
    15241545        $message                = isset( $_POST['cntctfrm_contact_message'] ) ? sanitize_textarea_field( wp_strip_all_tags( wp_unslash( $_POST['cntctfrm_contact_message'] ) ) ) : '';
    15251546        $phone                  = isset( $_POST['cntctfrm_contact_phone'] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_contact_phone'] ) ) : '';
     1547        $esign                  = isset( $_POST['cntctfrm_esign_image'] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_esign_image'] ) ) : '';
     1548        $esign_start            = isset( $_POST['cntctfrm_esign_start'] ) ? intval( sanitize_text_field( wp_unslash( $_POST['cntctfrm_esign_start'] ) ) ) : 0;
    15261549
    15271550        /* check language and replace with en default if need */
     
    15751598        if ( 1 === absint( $cntctfrm_options['required_phone_field'] ) && 1 === absint( $cntctfrm_options['display_phone_field'] ) ) {
    15761599            $cntctfrm_error_message['error_phone'] = $cntctfrm_options['phone_error'][ $language ];
     1600        }
     1601        if ( 1 === absint( $cntctfrm_options['required_esign'] ) && 1 === absint( $cntctfrm_options['display_esign'] ) ) {
     1602            $cntctfrm_error_message['error_esign'] = $cntctfrm_options['esign_error'][ $language ];
    15771603        }
    15781604        $cntctfrm_error_message['error_form'] = $cntctfrm_options['form_error'][ $language ];
     
    16321658        }
    16331659
     1660        if ( 1 === absint( $cntctfrm_options['display_esign'] ) && 1 === absint( $cntctfrm_options['required_esign'] ) && '' !== $esign && 1 === $esign_start ) {
     1661            unset( $cntctfrm_error_message['error_esign'] );
     1662        }
     1663
    16341664        if ( 1 === $cntctfrm_options['message_limit'] && '' !== $message ) {
    16351665            $min_length     = isset( $cntctfrm_options['message_limit_min'] ) && ! empty( $cntctfrm_options['message_limit_min'] ) ? absint( $cntctfrm_options['message_limit_min'] ) : null;
     
    18471877        $phone      = isset( $_POST['cntctfrm_contact_phone'] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_contact_phone'] ) ) : '';
    18481878        $dropdown   = isset( $_POST['cntctfrm_contact_dropdown'] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_contact_dropdown'] ) ) : '';
     1879        $esign      = isset( $_POST['cntctfrm_esign_image'] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_esign_image'] ) ) : '';
     1880
    18491881        $user_agent = cntctfrm_clean_input( $_SERVER['HTTP_USER_AGENT'] );
    18501882        if ( isset( $_COOKIE['cntctfrm_send_mail'] ) && true === (bool) $_COOKIE['cntctfrm_send_mail'] ) {
     
    19772009                            }
    19782010                            break;
     2011                        case 'esign':
     2012                            if ( 1 === absint( $cntctfrm_options['display_esign'] ) ) {
     2013                                $message_text .= '<tr><td>';
     2014                                $message_text .= ( 1 === absint( $cntctfrm_options['change_label_in_email'] ) ) ? $cntctfrm_options['esign_label'][ $lang ] : esc_html__( 'E-sign', 'contact-form-plugin' );
     2015                                $message_text .= '</td><td><img src="cid:cntctfrm_sign" /></td></tr>';
     2016                            }
     2017                            break;
    19792018                    }
    19802019                }
     
    19842023                $message_text_for_user = $message_text . '</table></body></html>';
    19852024                $message_text         .= $user_info_string . '</table></body></html>';
     2025
    19862026            } else {
    19872027                $message_text = esc_html__( 'Site', 'contact-form-plugin' ) . ': ' . get_bloginfo( 'url' ) . "\r\n";
     
    20262066                            }
    20272067                            break;
     2068                        case 'esign':
     2069                            if ( 1 === absint( $cntctfrm_options['display_esign'] ) ) {
     2070                                $message_text .= ( 1 === absint( $cntctfrm_options['change_label_in_email'] ) ) ? $cntctfrm_options['esign_label'][ $lang ] : esc_html__( 'E-sign', 'contact-form-plugin' );
     2071                                $message_text .= ': (attached)' . "\r\n";
     2072                            }
     2073                            break;
    20282074                    }
    20292075                }
     
    20972143                }
    20982144
     2145                if ( 1 === absint( $cntctfrm_options['display_esign'] ) ) {
     2146                    $attachments_new = array();
     2147                    $upload_dir  = wp_upload_dir();
     2148                    $upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR;
     2149
     2150                    $cntctfrm_path_of_sign_file = $upload_path . '/sign.png';
     2151
     2152                    $img     = str_replace( 'data:image/png;base64,', '', $esign );
     2153                    $img     = str_replace( ' ', '+', $img );
     2154                    $decoded = base64_decode( $img );
     2155
     2156                    file_put_contents( $cntctfrm_path_of_sign_file, $decoded );
     2157
     2158                    $attachments_new[] = array(
     2159                        'uid'  => 'cntctfrm_sign',
     2160                        'name' => 'sign.png',
     2161                        'file' => $cntctfrm_path_of_sign_file
     2162                    );
     2163
     2164                    add_action( 'phpmailer_init', function( &$phpmailer ) use( $attachments_new ) {
     2165                        $phpmailer->SMTPKeepAlive=true;
     2166                        foreach ( $attachments_new as $attachment ) {
     2167                            $phpmailer->AddEmbeddedImage( $attachment['file'], $attachment['uid'], $attachment['name'] );
     2168                        }
     2169                    });
     2170                }
     2171
    20992172                if ( isset( $_POST['cntctfrm_contact_send_copy'] ) && 1 === absint( $_POST['cntctfrm_contact_send_copy'] ) ) {
    21002173                    wp_mail( $email, $subject, $message_text_for_user, $headers, $attachments );
     
    21032176                /* Mail it */
    21042177                $mail_result = wp_mail( $to, $subject, $message_text, $headers, $attachments );
     2178               
     2179                if ( 1 === absint( $cntctfrm_options['display_esign'] ) ) {
     2180                    foreach ( $attachments_new as $attachment ) {
     2181                        if ( file_exists( $attachment['name'] ) ) {
     2182                            unlink( $attachment['name'] );
     2183                        }
     2184                    }
     2185                    $attachments_new = NULL;
     2186                }
     2187
    21052188                /* Delete attachment */
    21062189                if ( 1 === absint( $cntctfrm_options['attachment'] ) && ! empty( $_FILES['cntctfrm_contact_attachment']['tmp_name'] ) && array( '' ) !== $_FILES['cntctfrm_contact_attachment']['tmp_name']
     
    21162199                $headers .= 'MIME-Version: 1.0' . "\r\n";
    21172200
    2118                 if ( 1 === absint( $cntctfrm_options['attachment'] ) && ! empty( $_FILES['cntctfrm_contact_attachment']['tmp_name'] ) && array( '' ) !== $_FILES['cntctfrm_contact_attachment']['tmp_name'] ) {
     2201                if ( ( 1 === absint( $cntctfrm_options['attachment'] ) && ! empty( $_FILES['cntctfrm_contact_attachment']['tmp_name'] ) && array( '' ) !== $_FILES['cntctfrm_contact_attachment']['tmp_name'] ) || 1 === absint( $cntctfrm_options['display_esign'] ) ) {
     2202                    error_log( print_r( 'display_esign', true ) . PHP_EOL, 3, dirname( __FILE__ ) . '/error.log' );
    21192203                    $message_block          = $message_text;
    21202204                    $message_block_for_user = $message_text_for_user;
     
    21432227
    21442228                    /* Number of uploaded files */
    2145                     $num_files = count( (array) $_FILES['cntctfrm_contact_attachment']['tmp_name'] );
    2146                     for ( $i = 0; $i < $num_files; $i++ ) {
    2147                         global $cntctfrm_path_of_uploaded_file, $cntctfrm_path_of_uploaded_files;
    2148 
    2149                         if ( $cntctfrm_options['active_multi_attachment'] ) {
    2150                             $file_name   = sanitize_file_name( $_FILES['cntctfrm_contact_attachment']['name'][ $i ] );
    2151                             $file        = file_get_contents( $cntctfrm_path_of_uploaded_files[ $i ] );
    2152                             $file_size   = filesize( $cntctfrm_path_of_uploaded_files[ $i ] );
    2153                             $description = basename( $cntctfrm_path_of_uploaded_files[ $i ] );
    2154                         } else {
    2155                             $file_name   = sanitize_file_name( $_FILES['cntctfrm_contact_attachment']['name'] );
    2156                             $file        = file_get_contents( $cntctfrm_path_of_uploaded_file );
    2157                             $file_size   = filesize( $cntctfrm_path_of_uploaded_file );
    2158                             $description = basename( $cntctfrm_path_of_uploaded_file );
     2229                    if ( 1 === absint( $cntctfrm_options['display_esign'] ) ) {
     2230                        $file_name   = 'sign.png';
     2231                        $file        = str_replace( 'data:image/png;base64,', '', $esign );
     2232                        //$file     = str_replace( ' ', '+', $file );
     2233                        //$decoded = base64_decode( $file );
     2234
     2235                        $message_text          .= $bound . "\r\n" .
     2236                            "Content-Type: image/png;\r\n" .
     2237                            "Content-Disposition: inline; filename='sign.png'\r\n" .
     2238                            //"Content-Location: sign.png\r\n" .
     2239                            "Content-ID: <cntctfrm_sign>;\r\n" .
     2240                            "Content-Transfer-Encoding: base64\r\n\r\n" . $file . "\r\n\r\n";
     2241                        $message_text_for_user .= $bound . "\r\n" .
     2242                            "Content-Type: image/png;\r\n" .
     2243                            "Content-Disposition: inline; filename='sign.png'\r\n" .
     2244                            //"Content-Location: sign.png\r\n" .
     2245                            "Content-ID: <cntctfrm_sign>;\r\n" .
     2246                            "Content-Transfer-Encoding: base64\r\n\r\n" . $file . "\r\n\r\n";
     2247                    }
     2248                    if ( 1 === absint( $cntctfrm_options['attachment'] ) && ! empty( $_FILES['cntctfrm_contact_attachment']['tmp_name'] ) ) {
     2249                        $num_files = count( (array) $_FILES['cntctfrm_contact_attachment']['tmp_name'] );
     2250                        for ( $i = 0; $i < $num_files; $i++ ) {
     2251                            global $cntctfrm_path_of_uploaded_file, $cntctfrm_path_of_uploaded_files;
     2252
     2253                            if ( $cntctfrm_options['active_multi_attachment'] ) {
     2254                                $file_name   = sanitize_file_name( $_FILES['cntctfrm_contact_attachment']['name'][ $i ] );
     2255                                $file        = file_get_contents( $cntctfrm_path_of_uploaded_files[ $i ] );
     2256                                $file_size   = filesize( $cntctfrm_path_of_uploaded_files[ $i ] );
     2257                                $description = basename( $cntctfrm_path_of_uploaded_files[ $i ] );
     2258                            } else {
     2259                                $file_name   = sanitize_file_name( $_FILES['cntctfrm_contact_attachment']['name'] );
     2260                                $file        = file_get_contents( $cntctfrm_path_of_uploaded_file );
     2261                                $file_size   = filesize( $cntctfrm_path_of_uploaded_file );
     2262                                $description = basename( $cntctfrm_path_of_uploaded_file );
     2263                            }
     2264                            $message_text          .= $bound . "\r\n" .
     2265                                'Content-Type: application/octet-stream; name="' . $file_name . "\"\r\n" .
     2266                                'Content-Description: ' . $description . "\r\n" .
     2267                                "Content-Disposition: attachment;\r\n" . ' filename="' . $file_name . '"; size=' . $file_size . ";\r\n" .
     2268                                "Content-Transfer-Encoding: base64\r\n\r\n" . chunk_split( base64_encode( $file ) ) . "\r\n\r\n";
     2269                            $message_text_for_user .= $bound . "\r\n" .
     2270                                'Content-Type: application/octet-stream; name="' . $file_name . "\"\r\n" .
     2271                                'Content-Description: ' . $description . "\r\n" .
     2272                                "Content-Disposition: attachment;\r\n" . ' filename="' . $file_name . '"; size=' . $file_size . ";\r\n" .
     2273                                "Content-Transfer-Encoding: base64\r\n\r\n" . chunk_split( base64_encode( $file ) ) . "\r\n\r\n";
    21592274                        }
    2160                         $message_text          .= $bound . "\r\n" .
    2161                             'Content-Type: application/octet-stream; name="' . $file_name . "\"\r\n" .
    2162                             'Content-Description: ' . $description . "\r\n" .
    2163                             "Content-Disposition: attachment;\r\n" . ' filename="' . $file_name . '"; size=' . $file_size . ";\r\n" .
    2164                             "Content-Transfer-Encoding: base64\r\n\r\n" . chunk_split( base64_encode( $file ) ) . "\r\n\r\n";
    2165                         $message_text_for_user .= $bound . "\r\n" .
    2166                             'Content-Type: application/octet-stream; name="' . $file_name . "\"\r\n" .
    2167                             'Content-Description: ' . $description . "\r\n" .
    2168                             "Content-Disposition: attachment;\r\n" . ' filename="' . $file_name . '"; size=' . $file_size . ";\r\n" .
    2169                             "Content-Transfer-Encoding: base64\r\n\r\n" . chunk_split( base64_encode( $file ) ) . "\r\n\r\n";
    21702275                    }
    21712276                    $message_text          .= $bound_last;
    21722277                    $message_text_for_user .= $bound_last;
     2278
     2279                    error_log( print_r( $message_text, true ) . PHP_EOL, 3, dirname( __FILE__ ) . '/error.log' );
    21732280
    21742281                } else {
     
    23542461     */
    23552462    function cntctfrm_wp_enqueue_style() {
    2356         global $cntctfrm_plugin_info;
     2463        global $cntctfrm_plugin_info, $cntctfrm_options, $cntctfrm_form_count, $cntctfrm_stile_options;
     2464        if ( empty( $cntctfrm_options ) ) {
     2465            cntctfrm_settings();
     2466        }
     2467
    23572468        wp_enqueue_style( 'cntctfrm_form_style', plugins_url( 'css/form_style.css', __FILE__ ), false, $cntctfrm_plugin_info['Version'] );
     2469        if ( isset( $cntctfrm_options['display_esign'] ) && 1 === $cntctfrm_options['display_esign'] ) {
     2470            wp_enqueue_script( 'cntctfrm_lemonade', plugins_url( 'js/lemonade.min.js', __FILE__ ), array(), '5.0.0', true );
     2471            wp_enqueue_script( 'cntctfrm_lemonade_signature', plugins_url( 'js/signature.min.js', __FILE__ ), array(), '5.0.0', true );
     2472            wp_enqueue_script( 'cntctfrm_signature', plugins_url( 'js/cntctfrm_signature.js', __FILE__ ), array(), '2.0', true );
     2473            $script_vars = array(
     2474                'cntctfrm_sign_text' => esc_html__( 'Please sign in the box above', 'contact-form-plugin' )
     2475            );
     2476            wp_localize_script( 'cntctfrm_signature', 'cntctfrm_vars', $script_vars );
     2477        }
    23582478    }
    23592479}
  • contact-form-plugin/trunk/css/form_style.css

    r3014821 r3427184  
    179179    max-width: 100% !important;
    180180}
     181.cntctfrm_field_esign_wrap {
     182    position: relative;
     183}
     184div[id^='cntctfrm_esign_signature'] canvas {
     185    background-color: #f0f0f0;
     186}
     187.cntctfrm_esign_reset {
     188    cursor: pointer;
     189    position: absolute;
     190    top: -30px;
     191    left: 300px;
     192    width: 25px;
     193    height: 25px;
     194    font-size: 25px;
     195}
  • contact-form-plugin/trunk/css/style.css

    r2372356 r3427184  
    172172    padding-top: 3px;
    173173}
     174/* E-sign */
     175#cntctfrm_contact_esign {
     176    border: 1px solid #f0f0f1;
     177    height: 50px;
     178    background-color: #f0f0f1;
     179}
    174180@media screen and (max-width: 1350px) {
    175181    #cntctfrm_additional_settings_tab .form-table td {
  • contact-form-plugin/trunk/includes/class-cntctfrm-settings.php

    r3356051 r3427184  
    300300                $this->options['dropdown_value_1']  = isset( $_POST['cntctfrm_dropdown_value_1'] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_dropdown_value_1'] ) ) : '';
    301301                $this->options['dropdown_value_2']  = isset( $_POST['cntctfrm_dropdown_value_2'] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_dropdown_value_2'] ) ) : '';
    302                 $this->options['display_dropdown']   = isset( $_POST['cntctfrm_display_dropdown'] ) ? 1 : 0;
     302                $this->options['display_dropdown']  = isset( $_POST['cntctfrm_display_dropdown'] ) ? 1 : 0;
    303303                $this->options['required_dropdown'] = isset( $_POST['cntctfrm_required_dropdown'] ) ? 1 : 0;
     304                $this->options['display_esign']     = isset( $_POST['cntctfrm_display_esign'] ) ? 1 : 0;
     305                $this->options['required_esign']    = isset( $_POST['cntctfrm_required_esign'] ) ? 1 : 0;
    304306
    305307                if ( 1 === $this->options['change_label'] && isset( $_POST['cntctfrm_name_label'] ) ) {
     
    316318                        $this->options['attachment_tooltip'][ $key ]      = isset( $_POST['cntctfrm_attachment_tooltip'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_attachment_tooltip'][ $key ] ) ) : '';
    317319                        $this->options['dropdown_label'][ $key ]          = isset( $_POST['cntctfrm_dropdown_label'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_dropdown_label'][ $key ] ) ) : '';
     320                        $this->options['esign_label'][ $key ]             = isset( $_POST['cntctfrm_esign_label'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_esign_label'][ $key ] ) ) : '';
    318321                        $this->options['send_copy_label'][ $key ]         = isset( $_POST['cntctfrm_send_copy_label'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_send_copy_label'][ $key ] ) ) : '';
    319322                        $this->options['gdpr_label'][ $key ]              = isset( $_POST['cntctfrm_gdpr_label'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_gdpr_label'][ $key ] ) ) : '';
     
    334337                        $this->options['captcha_error'][ $key ]           = isset( $_POST['cntctfrm_captcha_error'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_captcha_error'][ $key ] ) ) : '';
    335338                        $this->options['dropdown_error'][ $key ]          = isset( $_POST['cntctfrm_dropdown_error'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_dropdown_error'][ $key ] ) ) : '';
     339                        $this->options['esign_error'][ $key ]             = isset( $_POST['cntctfrm_esign_error'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_esign_error'][ $key ] ) ) : '';
    336340                        $this->options['form_error'][ $key ]              = isset( $_POST['cntctfrm_form_error'][ $key ] ) ? sanitize_text_field( wp_unslash( $_POST['cntctfrm_form_error'][ $key ] ) ) : '';
    337341                    }
     
    349353                        $this->options['attachment_tooltip']      = $option_defaults['attachment_tooltip'];
    350354                        $this->options['dropdown_label']          = $option_defaults['dropdown_label'];
     355                        $this->options['esign_label']             = $option_defaults['esign_label'];
    351356                        $this->options['send_copy_label']         = isset( $option_defaults['send_copy_label'] ) ? $option_defaults['send_copy_label'] : array( 'default' => __( 'Send me copy.', 'contact-form-plugin' ) );
    352357                        $this->options['gdpr_label']              = $option_defaults['gdpr_label'];
     
    367372                        $this->options['captcha_error']           = $option_defaults['captcha_error'];
    368373                        $this->options['dropdown_error']          = $option_defaults['dropdown_error'];
     374                        $this->options['esign_error']             = $option_defaults['esign_error'];
    369375                        $this->options['form_error']              = $option_defaults['form_error'];
    370376                        foreach ( $this->options['thank_text'] as $key => $val ) {
     
    381387                        $this->options['attachment_tooltip']['default']      = $option_defaults['attachment_tooltip']['default'];
    382388                        $this->options['dropdown_label']['default']          = isset( $option_defaults['dropdown_label']['default'] ) ? $option_defaults['dropdown_label']['default'] : array( 'default' => __( 'Dropdown', 'contact-form-plugin' ) );
     389                        $this->options['esign_label']['default']             = isset( $option_defaults['esign_label']['default'] ) ? $option_defaults['esign_label']['default'] : array( 'default' => __( 'E-sign', 'contact-form-plugin' ) );
    383390                        $this->options['send_copy_label']['default']         = $option_defaults['send_copy_label']['default'];
    384391                        $this->options['gdpr_label']['default']              = $option_defaults['gdpr_label']['default'];
     
    398405                        $this->options['captcha_error']['default']           = $option_defaults['captcha_error']['default'];
    399406                        $this->options['dropdown_error']['default']          = $option_defaults['dropdown_error']['default'];
     407                        $this->options['esign_error']['default']             = $option_defaults['esign_error']['default'];
    400408                        $this->options['form_error']['default']              = $option_defaults['form_error']['default'];
    401409
     
    10591067                                <label><?php esc_html_e( 'Value 2', 'contact-form-plugin' ); ?><br /><input type="text" name="cntctfrm_dropdown_value_2" maxlength="100"value="<?php echo esc_html( $this->options['dropdown_value_2'] ); ?>" /></label>
    10601068                            </td>
     1069                        <?php } ?>
     1070                        <?php do_action( 'cntctfrm_display_settings_table_emptiness' ); ?>
     1071                    </tr>
     1072                    <tr valign="top" class="cntctfrm-esign">
     1073                        <td>
     1074                            <?php esc_html_e( 'E-sign', 'contact-form-plugin' ); ?>
     1075                        </td>
     1076                        <td>
     1077                            <label class="bws_info"><input type="checkbox" name="cntctfrm_display_esign" value="1" <?php checked( '1', $this->options['display_esign'] ); ?> /></label>
     1078                        </td>
     1079                        <td>
     1080                            <label><input type="checkbox" id="cntctfrm_required_esign" name="cntctfrm_required_esign" value="1" <?php checked( '1', $this->options['required_esign'] ); ?> /></label>
     1081                        </td>
     1082                        <?php if ( ! $this->hide_pro_tabs ) { ?>
     1083                            <td class="bws_pro_version"></td>
     1084                            <td class="bws_pro_version"></td>
     1085                            <td></td>
     1086                        <?php } else { ?>
     1087                            <td></td>
    10611088                        <?php } ?>
    10621089                        <?php do_action( 'cntctfrm_display_settings_table_emptiness' ); ?>
     
    14051432                                <input type="text" maxlength="250" name="cntctfrm_attachment_tooltip[default]" value="<?php echo esc_html( $this->options['attachment_tooltip']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'Tips below the Attachment block', 'contact-form-plugin' ); ?></span><br />
    14061433                                <input type="text" maxlength="250" name="cntctfrm_dropdown_label[default]" value="<?php echo esc_html( $this->options['dropdown_label']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'Dropdown', 'contact-form-plugin' ); ?>:</span><br />
     1434                                <input type="text" maxlength="250" name="cntctfrm_esign_label[default]" value="<?php echo esc_html( $this->options['esign_label']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'E-sign', 'contact-form-plugin' ); ?>:</span><br />
    14071435                                <input type="text" maxlength="250" name="cntctfrm_send_copy_label[default]" value="<?php echo esc_html( $this->options['send_copy_label']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'Send me a copy', 'contact-form-plugin' ); ?></span><br />
    14081436                                <input type="text" maxlength="250" name="cntctfrm_gdpr_label[default]" value="<?php echo esc_html( $this->options['gdpr_label']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'I consent to having this site collect my personal data.', 'contact-form-plugin' ); ?></span><br />
     
    14221450                                <input type="text" maxlength="250" name="cntctfrm_captcha_error[default]" value="<?php echo esc_html( $this->options['captcha_error']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'Error message for the Captcha field', 'contact-form-plugin' ); ?></span><br />
    14231451                                <input type="text" maxlength="250" name="cntctfrm_dropdown_error[default]" value="<?php echo esc_html( $this->options['dropdown_error']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'Error message for the Dropdown field', 'contact-form-plugin' ); ?></span><br />
     1452                                <input type="text" maxlength="250" name="cntctfrm_esign_error[default]" value="<?php echo esc_html( $this->options['esign_error']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'Error message for the E-sign field', 'contact-form-plugin' ); ?></span><br />
    14241453                                <input type="text" maxlength="250" name="cntctfrm_form_error[default]" value="<?php echo esc_html( $this->options['form_error']['default'] ); ?>" /> <span class="bws_info"><?php esc_html_e( 'Error message for the whole form', 'contact-form-plugin' ); ?></span><br />
    14251454                            </div>
     
    14511480                                        <input type="text" maxlength="250" name="cntctfrm_attachment_tooltip[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['attachment_tooltip'][ $val ] ) ? esc_html( $this->options['attachment_tooltip'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'Tips below the Attachment block', 'contact-form-plugin' ); ?></span><br />
    14521481                                        <input type="text" maxlength="250" name="cntctfrm_dropdown_label[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['dropdown_label'][ $val ] ) ? esc_html( $this->options['dropdown_label'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'Dropdown', 'contact-form-plugin' ); ?>:</span><br />
     1482                                        <input type="text" maxlength="250" name="cntctfrm_esign_label[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['esign_label'][ $val ] ) ? esc_html( $this->options['esign_label'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'E-sign', 'contact-form-plugin' ); ?>:</span><br />
    14531483                                        <input type="text" maxlength="250" name="cntctfrm_send_copy_label[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['send_copy_label'][ $val ] ) ? esc_html( $this->options['send_copy_label'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'Send me a copy', 'contact-form-plugin' ); ?></span><br />
    14541484                                        <input type="text" maxlength="250" name="cntctfrm_gdpr_label[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['gdpr_label'][ $val ] ) ? esc_html( $this->options['gdpr_label'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'I consent to having this site collect my personal data.', 'contact-form-plugin' ); ?></span><br />
     
    14681498                                        <input type="text" maxlength="250" name="cntctfrm_captcha_error[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['captcha_error'][ $val ] ) ? esc_html( $this->options['captcha_error'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'Error message for the Captcha field', 'contact-form-plugin' ); ?></span><br />
    14691499                                        <input type="text" maxlength="250" name="cntctfrm_dropdown_error[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['dropdown_error'][ $val ] ) ? esc_html( $this->options['dropdown_error'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'Error message for the Dropdown field', 'contact-form-plugin' ); ?></span><br />
     1500                                        <input type="text" maxlength="250" name="cntctfrm_esign_error[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['esign_error'][ $val ] ) ? esc_html( $this->options['esign_error'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'Error message for the E-sign field', 'contact-form-plugin' ); ?></span><br />
    14701501                                        <input type="text" maxlength="250" name="cntctfrm_form_error[<?php echo esc_attr( $val ); ?>]" value="<?php echo isset( $this->options['form_error'][ $val ] ) ? esc_html( $this->options['form_error'][ $val ] ) : ''; ?>" /> <span class="bws_info"><?php esc_html_e( 'Error message for the whole form', 'contact-form-plugin' ); ?></span><br />
    14711502                                    </div>
     
    22202251                                                        <?php
    22212252                                                        break;
     2253                                                    case 'cntctfrm_contact_esign':
     2254                                                        ?>
     2255                                                        <li class="cntctfrm_field_wrap">
     2256                                                            <div class="cntctfrm_label cntctfrm_label_esign">
     2257                                                                <label for="cntctfrm_contact_esign">
     2258                                                                <?php
     2259                                                                echo esc_html( $this->options['esign_label']['default'] );
     2260                                                                if ( 1 === absint( $this->options['required_esign'] ) ) {
     2261                                                                    echo '<span class="required"> ' . esc_attr( $this->options['required_symbol'] ) . '</span>';
     2262                                                                }
     2263                                                                ?>
     2264                                                                </label>
     2265                                                            </div>
     2266                                                            <div class="cntctfrm_error_text hidden"><?php echo esc_html( $this->options['esign_error']['default'] ); ?></div>
     2267                                                            <div class="cntctfrm_input cntctfrm_input_esign">
     2268                                                                <div class="cntctfrm_drag_wrap"></div>
     2269                                                                <div class="bws_no_bind_notice" id="cntctfrm_contact_esign"><input type="hidden" name="cntctfrm_contact_esign" /></div>
     2270                                                            </div>
     2271                                                        </li>
     2272                                                        <?php
     2273                                                        break;
    22222274                                                    default:
    22232275                                                        break;
  • contact-form-plugin/trunk/readme.txt

    r3395797 r3427184  
    44Tags: wp contact form, contact widget, shortcode contact form, contact button, contact page
    55Requires at least: 6.5
    6 Tested up to: 6.8.2
    7 Stable tag: 4.3.5
     6Tested up to: 6.9
     7Stable tag: 4.3.6
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7676* Advanced File Handling - Allow multiple file attachments
    7777* Extended Form Fields - Enable additional pre-built form elements
     78* E-sign Form Field - Enable sign form element
    7879* Two-Column Layout Option - Create professional multi-column forms
    7980* Custom Form Width - Adjust form width to match your design
     
    331332== Changelog ==
    332333
     334= V4.3.6 - 25.12.2025 =
     335* Update : All functionality was updated for WordPress 6.9.
     336* NEW : E-sign field has been added.
     337
    333338= V4.3.5 - 14.11.2025 =
    334339* Bugfix : HTML issue in the letters has been fixed.
     
    746751== Upgrade Notice ==
    747752
     753= V4.3.6 =
     754* The compatibility with new WordPress version updated.
     755* New features added.
     756
    748757= V4.3.5 =
    749758* Bugs fixed.
Note: See TracChangeset for help on using the changeset viewer.