%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/t/r/a/tradesc/www/relax/wp-content/uploads/wpcode/cache/library/
Upload File :
Create Path :
Current File : /home/t/r/a/tradesc/www/relax/wp-content/uploads/wpcode/cache/library/profile_wpforms.json

{"categories":[{"name":"WPForms Team","slug":"wpforms"}],"snippets":[{"library_id":14095,"title":"Accordion Template Helper","code":"\/**\r\n * For the Accordion Template, this is a helper script\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\nadd_action( 'wp_head', function () { ?>\r\n  \r\n    <style>\r\n    \/* CSS magic to hide the page breaks and display section dividers as \"buttons\" based on the form class name *\/\r\n\t\t.wpf-accordion-form .wpforms-page,\r\n\t\t.wpf-accordion-form .wpforms-submit-container {\r\n\t\t\tdisplay: block!important;\r\n\t\t}\r\n\t\t\r\n\t\t.wpf-accordion-form .wpforms-page-prev,\r\n\t\t.wpf-accordion-form .wpforms-page-next {\r\n\t\t\tdisplay: none!important;\r\n\t\t}\r\n\t\t\r\n\t\t.wpf-accordion-form .wpforms-field-divider {\r\n\t\t\tpadding: 0;\r\n\t\t\tborder: 0;\r\n\t\t}\r\n\t\t\r\n\t\t.wpf-accordion-form .wpforms-field-divider h3 {\r\n\t\t\tfont-size: 18px;\r\n\t\t\tpadding: 25px;\r\n\t\t\tborder: 1px solid #eee;\r\n\t\t\tborder-radius: 4px;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\t\t.wpf-accordion-form div:not(.wpforms-layout-column) > .wpforms-field:not(.wpforms-field-divider) {\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t\t.wpf-accordion-form .wpforms-field-divider h3:before {\r\n\t\t\tcontent: '\u2193';\r\n\t\t\tmargin-right: 10px;\r\n\t\t}\r\n    <\/style>\r\n  \r\n<?php } );\r\n  \r\n\/\/ Enable section dividers to act like accordion toggles\r\nfunction wpf_accordion_form() {\r\n    ?>\r\n    <script>\r\n\t\t( function( document, window, $ ) {\r\n\t\t\t$( '.wpf-accordion-form .wpforms-field-divider' ).on( 'click', function() {\r\n\t\t\t\tconst $this = $( this );\r\n\t\t\t\tif ( $this.hasClass( 'active' ) ) {\r\n\t\t\t\t\t$this.removeClass( 'active' );\r\n\t\t\t\t\t$this.nextUntil( '.wpforms-field-divider' ).hide();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t$this.nextUntil( '.wpforms-field-divider' ).show();\r\n\t\t\t\t$this.addClass( 'active' );\r\n\t\t\t})\r\n\t\t}( document, window, jQuery ) );\r\n    <\/script>\r\n    <?php\r\n}\r\nadd_action( 'wpforms_wp_footer_end', 'wpf_accordion_form', 10 );","note":"This snippet will allow you to use Section Divider fields in an \"accordion-like\" manner by...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["templates"],"max_version":""},{"library_id":17943,"title":"Add Autofocus on Your Form","code":"\/* \r\nAdd autofocus to the first form field of the form\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-add-autofocus-on-your-form\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nfunction wpf_dev_autofocus() {\r\n?>\r\n<script type=\"text\/javascript\">\r\n    jQuery(document).ready(function() {\r\n         \r\n        var first_input = jQuery( 'form.wpforms-form input[type=text]:visible:enabled:first, textarea:visible:enabled:first' )[0];\r\n         \r\n        if (first_input != undefined) {\r\n            first_input.focus();\r\n        }\r\n         \r\n    });\r\n<\/script>\r\n<?php\r\n}\r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_autofocus', 10 );","note":"This snippet adds auto focus to the first field of your form when the page...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6192,"title":"Add Field Values for Dropdown, Checkboxes, and Multiple Choice Fields","code":"\/**\r\n * Add field values for dropdown, checkboxes, and multiple choice fields\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/add-field-values-for-dropdown-checkboxes-and-multiple-choice-fields\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nadd_filter( 'wpforms_fields_show_options_setting', '__return_true' );","note":"Adds the option to display field values for Dropdown, Checkboxes, and Multiple Choice fields. Once...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["field-values"],"max_version":""},{"library_id":23132,"title":"Add Redirection to Custom Password Reset Form","code":"\/* \r\nRedirect Lost Password to Custom Password Reset \r\n\r\nOriginal doc link: https:\/\/wpforms.com\/how-to-customize-the-wordpress-password-reset-form\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nfunction my_custom_lostpassword_url() {\r\n    return home_url( '\/reset-password\/' );\r\n}\r\n\r\nadd_filter( 'lostpassword_url', 'my_custom_lostpassword_url' );","note":"With this filter you can redirect any lost password requests to a custom reset form","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":23030,"title":"Adding a Background Image to Your Forms","code":"\/* \r\nAdding a background image to your forms.\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/docs\/how-to-add-a-background-image-in-wpforms\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n.wpf-custom-background {\r\n     background-image: url(\/path\/wpforms-backdrop.png) !important;\r\n     padding: 15px 35px !important;\r\n     \/*Padding is optional, but improves appearance when using a background image in your form.*\/\r\n}\r\n","note":"With this snippet, it follows the tutorial listed inside the Adding a Background Image to...","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":[],"max_version":""},{"library_id":6186,"title":"Allow Date Range Selection in Date Picker","code":"\/**\r\n * Adds a date range inside the date picker field.\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/allow-date-range-or-multiple-dates-in-date-picker\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_date_picker_range() {\r\n?>\r\n    <script type=\"text\/javascript\">\r\n \r\n        window.wpforms_datepicker = {\r\n            mode: \"range\"\r\n        }\r\n \r\n    <\/script>\r\n<?php\r\n}\r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_date_picker_range', 10 );","note":"Adds the ability to select a date range inside the Date Picker field.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["date-picker","date-range"],"max_version":""},{"library_id":6187,"title":"Allow Multiple Dates Selection in Date Picker","code":"\/**\r\n * Adds the ability to select multiple dates inside the Date Picker field\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/allow-date-range-or-multiple-dates-in-date-picker\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nfunction wpf_dev_date_picker_multiple() {\r\n    ?>\r\n    <script type=\"text\/javascript\">\r\n \r\n    window.wpforms_datepicker = {\r\n        mode: \"multiple\"\r\n    }\r\n \r\n    <\/script>\r\n    <?php\r\n}\r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_date_picker_multiple', 10 );\r\n","note":"Adds the ability to select multiple dates inside the Date Picker field.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["date-picker","multiple-dates"],"max_version":""},{"library_id":13523,"title":"Block IP Addresses From Completing Your Form","code":"\/**\r\n * Block form submissions based on IP address\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/how-to-block-ip-addresses-from-completing-your-form\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nfunction wpf_ip_block( $fields, $entry, $form_data ) {\r\n      \r\n    \/\/ Get the current users IP address\r\n    $ip_address = wpforms_get_ip();\r\n\r\n    \/\/ Enter all IP addresses here, separated by a comma\r\n    $blocked_ips = array(\r\n        '129.222.6.90',\r\n        '127.0.0.1',\r\n    );\r\n      \r\n    \/\/ Check if the current user IP address is a blocked IP\r\n    if ( in_array( $ip_address, $blocked_ips ) ) {\r\n\t\t\r\n        \/\/ Block form submission and print error\r\n        wpforms()->process->errors[ $form_data[ 'id' ] ] [ 'footer' ] = esc_html__( 'Your IP address has been blocked. Please contact the site administrator for further assistance.', 'text-domain' );\r\n    }\r\n}\r\nadd_action( 'wpforms_process', 'wpf_ip_block', 10, 3 );","note":"Using this snippet will allow you to add specific IP Addresses from completing your forms.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":13496,"title":"Centering a form","code":"\/* \r\nCenter the form inside a container\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-center-a-form\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n.wpforms-container.wpf-center {\r\n    margin: 0 auto !important;\r\n\/* Adjust the width in the next 2 lines as your site needs *\/\r\n    max-width: 500px !important;\r\n    width: 500px !important;\r\n}\r\n\r\n\/* Readjust the form width for smaller devices *\/\r\n@media only screen and (max-width: 600px) {\r\n\r\n\t.wpforms-container.wpf-center {\r\n\t\/* Reset the width for devices under 600px *\/\r\n\t\tmax-width: unset !important;\r\n\t\twidth: auto !important;\r\n}\r\n\t\r\n}","note":"This snippet will allow you to add a CSS class to your form which will...","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":[],"max_version":""},{"library_id":6178,"title":"Change CSV Export Delimiter","code":"\/**\r\n * Filters the delimiter used in CSV exports of form entries\r\n * \r\n * @link https:\/\/wpforms.com\/developers\/change-csv-export-delimiter\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_pro_admin_entries_export_configuration( $configuration ) {\r\n \r\n    $configuration[ 'csv_export_separator' ] = ';';\r\n \r\n        return $configuration;\r\n \r\n}\r\n \r\nadd_filter( 'wpforms_pro_admin_entries_export_configuration', 'wpf_dev_pro_admin_entries_export_configuration', 10, 1 );\r\n","note":"Changes the CSV delimiter that separates each form field on a form export. Remember to...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["csv-export","export"],"max_version":""},{"library_id":6190,"title":"Change Position of v2 Invisible reCAPTCHA Badge","code":"\/**\r\n * Change position of v2 Invisible reCAPTCHA badge\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/how-to-change-the-position-of-the-v2-invisible-recaptcha-badge\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nfunction wpf_dev_invisible_recaptcha_position( $data, $form_data ) {\r\n     \r\n    $type = wpforms_setting( 'recaptcha-type', 'v2' );\r\n    if ( 'invisible' === $type ) {\r\n        $data[ 'badge' ] = 'inline';\r\n    }\r\n \r\n    return $data;\r\n \r\n}\r\nadd_filter( 'wpforms_frontend_recaptcha', 'wpf_dev_invisible_recaptcha_position', 10, 2 );\r\n","note":"Changes the position of the v2 Invisible reCAPTCHA badge","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["invisible-recaptcha"],"max_version":""},{"library_id":13455,"title":"Change Sublabels for the Email Field","code":"\/**\r\n * Customize email field properties.\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-change-sublabels-for-the-email-field\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_email_field_properties( $properties, $field, $form_data ) {\r\n      \r\n    \/\/ Change the text for the sublabel\r\n    $properties[ 'inputs' ][ 'primary' ][ 'sublabel' ][ 'value' ]   = __( 'Enter Your Email', 'plugin-domain' );\r\n    $properties[ 'inputs' ][ 'secondary' ][ 'sublabel' ][ 'value' ] = __( 'To confirm, re-enter your email address here', 'plugin-domain' );\r\n  \r\n    return $properties;\r\n \r\n}\r\n \r\nadd_filter( 'wpforms_field_properties_email' , 'wpf_dev_email_field_properties', 10, 3 );\r\n","note":"Using this snippet will allow you to customize the sublabels that appear under the Email...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":13456,"title":"Change Sublabels for the Name Field","code":"\/**\r\n * Customize name field properties.\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/how-to-change-sublabels-for-the-name-field\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_name_field_properties( $properties, $field, $form_data ) {\r\n     \r\n    \/\/ Change the text for the sublabel\r\n    $properties[ 'inputs' ][ 'first' ][ 'sublabel' ][ 'value' ]  = __( 'First Name', 'plugin-domain' );\r\n    $properties[ 'inputs' ][ 'middle' ][ 'sublabel' ][ 'value' ] = __( 'Middle Initial', 'plugin-domain' );\r\n    $properties[ 'inputs' ][ 'last' ][ 'sublabel' ][ 'value' ]   = __( 'Last Name', 'plugin-domain' );\r\n \r\n    return $properties;\r\n}\r\n \r\nadd_filter( 'wpforms_field_properties_name' , 'wpf_dev_name_field_properties', 10, 3 );\r\n","note":"Using this snippet will allow you to customize the sublabels that appear under the Name...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":13450,"title":"Change Sublabels for the Stripe Credit Card Field","code":"\/**\r\n * Customize Stripe credit card field properties.\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-change-sublabels-for-the-credit-card-field\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n  \r\nfunction wpf_dev_creditcard_field_properties( $properties, $field, $form_data ) {\r\n       \r\n    \/\/ Change sub-label text on the Card Number field\r\n    $properties[ 'inputs' ][ 'number' ][ 'sublabel' ][ 'value' ] = __( 'Enter your card number', 'text-domain' );\r\n   \r\n    \/\/ Change sub-label text on the Card Name field\r\n    $properties[ 'inputs' ][ 'name' ][ 'sublabel' ][ 'value' ] = __( 'Name as it appears on the card', 'text-domain' );\r\n       \r\n    return $properties;\r\n}\r\n   \r\nadd_filter( 'wpforms_field_properties_stripe-credit-card' , 'wpf_dev_creditcard_field_properties', 10, 3 );\r\n","note":"With this snippet you can change the sublabels that appear on the Stripe Credit Card...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6185,"title":"Change the Required Field Indicator","code":"\/**\r\n * Modify the required field indicator\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-change-required-field-indicator\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_required_indicator( $text ) {\r\n \r\n    return ' <span class=\"wpforms-required-label\">' . __( '*', 'wpforms' ) . '<\/span>';\r\n}\r\n \r\nadd_filter( 'wpforms_get_field_required_label', 'wpf_dev_required_indicator', 10, 1 );","note":"Changes the required field indicator. You can set the asterisks symbol to plain text or...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["required-field"],"max_version":""},{"library_id":6179,"title":"Change the Submit Button Color","code":"\/* \r\nChange the color of the submit button\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-change-the-submit-button-color\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n.wpforms-form button[type=submit] {\r\n    background-color: #066AAB !important;\r\n    border-color: #066AAB !important;\r\n    color: #fff !important;\r\n    transition: background 0.3s ease-in-out;\r\n}\r\n \r\n.wpforms-form button[type=submit]:hover {\r\n    background-color: #066AAB !important;\r\n}","note":"Changes the color of the submit button for all WPForms. The colors in this CSS...","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":["css","styling","submit-button"],"max_version":""},{"library_id":23130,"title":"Change Validation Messages for WPML","code":"\/**\r\n * Customize strings for WPForms form validation \r\n * \r\n * @link https:\/\/wpforms.com\/developers\/change-validation-messages-for-wpml\/\r\n *\/\r\n \r\nfunction wpforms_dev_frontend_strings( $strings ) {\r\n \r\n$currentLanguage = defined( 'ICL_LANGUAGE_CODE' ) ? ICL_LANGUAGE_CODE : null;\r\n \r\n    switch ( $currentLanguage ) {\r\n             \r\n    \/\/ For French translation\r\n    case 'fr':\r\n \r\n        \/\/ Required field\r\n        $strings[ 'val_required' ] = 'Ce champ est requis.';\r\n \r\n        \/\/ Valid Email\r\n        $strings[ 'val_email' ] = 'Veuillez entrer une URL valide.';\r\n \r\n        \/\/ Email suggestion text\r\n        $strings[ 'val_email_suggestion' ] = 'Voulez-vous dire {suggestion}?';\r\n \r\n        \/\/ Email restricted text\r\n        $strings[ 'val_email_restricted' ] = 'Cette adresse e-mail n\\'est pas autoris\u00e9e.';\r\n \r\n        \/\/ Valid number\r\n        $strings[ 'val_number' ] = 'S\\'il vous plait, entrez un nombre valide.';\r\n \r\n        \/\/ Valid positive number\r\n        $strings[ 'val_number_positive' ] = 'Veuillez entrer un nombre positif valide.';\r\n \r\n        \/\/ Confirmation message 'fields do not match'\r\n        $strings[ 'val_confirm' ] = 'Les valeurs de champ ne correspondent pas.';\r\n \r\n        \/\/ Valid input mask incomplete\r\n        $strings[ 'val_inputmask_incomplete' ] = 'Veuillez remplir le champ au format requis.';\r\n \r\n        \/\/ Checkbox option limit\r\n        $strings[ 'val_checklimit' ] = 'Vous avez d\u00e9pass\u00e9 le nombre de s\u00e9lections autoris\u00e9es: {#}.';\r\n \r\n        \/\/ Character limit\r\n        $strings[ 'val_limit_characters' ] = 'La limite est de {limit} caract\u00e8res. Caract\u00e8res restants : {remaining}.';\r\n \r\n        \/\/ Word limit\r\n        $strings[ 'val_limit_words' ] = 'La limite est de {limit} mots. Mots restant : {restant}.';\r\n \r\n        \/\/ Valid URL\r\n        $strings[ 'val_url' ] = 'Veuillez saisir une URL valide.';\r\n \r\n        \/\/ All phone field - Smart, International and US\r\n        $strings [ 'val_phone' ] = 'Veuillez fournir un num\u00e9ro de t\u00e9l\u00e9phone valide.';\r\n \r\n        \/\/ Valid file extension\r\n        $strings[ 'val_fileextension' ] = 'Le type de fichier n\\'est pas autoris\u00e9.';\r\n \r\n        \/\/ File max size limit text\r\n        $strings[ 'val_filesize' ] = 'Le fichier d\u00e9passe la taille maximale autoris\u00e9e.';\r\n \r\n        \/\/ Number of files upload limit text\r\n        $strings[ 'maxfilenumber' ] = 'Les t\u00e9l\u00e9chargements de fichiers d\u00e9passent le nombre maximum autoris\u00e9 ({fileLimit}).';\r\n \r\n        \/\/ Valid 12h time format\r\n        $strings[ 'val_time12h' ] = 'Veuillez entrer l\\'heure au format 12 heures AM \/ PM (par exemple, 8h45)';\r\n \r\n        \/\/ Valid 24h time format\r\n        $strings[ 'val_time24h' ] = 'Veuillez entrer l\\'heure au format 24 heures (par exemple, 22h45).';\r\n \r\n        \/\/ Limit hours text 'Please enter time between...'\r\n        $strings[ 'val_time_limit' ] = 'Veuillez saisir une dur\u00e9e comprise entre {minTime} et {maxTime}.';\r\n \r\n        \/\/ Payment required text\r\n        $strings[ 'val_requiredpayment' ] = 'Le paiement est requis.';\r\n \r\n        \/\/ Valid credit card number\r\n        $strings[ 'val_creditcard' ] = 'Veuillez entrer un num\u00e9ro de carte de cr\u00e9dit valide.';\r\n \r\n        \/\/ Maximum size limit reached text\r\n        $strings[ 'val_post_max_size' ] = 'La taille totale des fichiers s\u00e9lectionn\u00e9s {totalSize} Mo d\u00e9passe la limite autoris\u00e9e {maxSize} Mo.';\r\n \r\n        \/\/ Password strength text\r\n        $strings[ 'val_password_strength' ] = 'Un mot de passe plus fort est requis. Envisagez d\\'utiliser des lettres majuscules et minuscules, des chiffres et des symboles.';\r\n \r\n        \/\/ Valid unique value required\r\n        $strings[ 'val_unique' ] = 'La valeur doit \u00eatre unique.';\r\n \r\n        \/\/ reCAPTCHA failed message text\r\n        $strings[ 'val_recaptcha_fail_msg' ] = 'La v\u00e9rification Google reCAPTCHA a \u00e9chou\u00e9, veuillez r\u00e9essayer plus tard.';\r\n \r\n    break;\r\n     \r\n    \/\/ For Spanish translation\r\n    case 'es':\r\n \r\n        \/\/ Required field\r\n        $strings[ 'val_required' ] = 'Este campo es requerido.';\r\n \r\n        \/\/ Valid Email\r\n        $strings[ 'val_email' ] = 'Por favor, introduce una direcci\u00f3n de correo electr\u00f3nico v\u00e1lida.';\r\n \r\n        \/\/ Email suggestion text\r\n        $strings[ 'val_email_suggestion' ] = '\u00bfQuiso decir {sugerencia}?';\r\n \r\n        \/\/ Email Restricted\r\n        $strings[ 'val_email_restricted' ] = 'Esta direcci\u00f3n de correo electr\u00f3nico no est\u00e1 permitida.';\r\n \r\n        \/\/ Valid number\r\n        $strings[ 'val_number' ] = 'Por favor ingrese un n\u00famero valido.';\r\n \r\n        \/\/ Valid positive number\r\n        $strings[ 'val_number_positive' ] = 'Introduzca un n\u00famero positivo v\u00e1lido.';\r\n \r\n        \/\/ Confirmation message 'fields do not match'\r\n        $strings[ 'val_confirm' ] = 'Los valores de campo no coinciden.';\r\n \r\n        \/\/ Valid input mask incomplete text\r\n        $strings[ 'val_inputmask_incomplete' ] = 'Por favor llene el campo en el formato requerido.';\r\n \r\n        \/\/ Checkbox option limit\r\n        $strings[ 'val_checklimit' ] = 'Ha excedido el n\u00famero de selecciones permitidas: {#}.';\r\n \r\n        \/\/ Character limit\r\n        $strings[ 'val_limit_characters' ] = 'El l\u00edmite es {l\u00edmite} caracteres. Caracteres restantes: {restante}.';\r\n \r\n        \/\/ Word limit\r\n        $strings[ 'val_limit_words' ] = 'El l\u00edmite es {l\u00edmite} palabras. Palabras restantes: {restante}.';\r\n \r\n        \/\/ Valid URL\r\n        $strings[ 'val_url' ] = 'Por favor introduzca un URL v\u00e1lido.';\r\n \r\n        \/\/ All phone field - Smart, International and US\r\n        $strings[ 'val_phone' ] = 'Por favor forne\u00e7a um n\u00famero de telefone v\u00e1lido.';\r\n \r\n        \/\/ Valid file type\r\n        $strings[ 'val_fileextension' ] = 'El tipo de archivo no est\u00e1 permitido.';\r\n \r\n        \/\/ Max size limit text\r\n        $strings[ 'val_filesize' ] = 'El archivo excede el tama\u00f1o m\u00e1ximo permitido.';\r\n \r\n        \/\/ Number of files upload limit text\r\n        $strings[ 'maxfilenumber' ] = 'Las cargas de archivos superan el n\u00famero m\u00e1ximo permitido ({fileLimit}).';\r\n \r\n        \/\/ Valid 12h time format\r\n        $strings[ 'val_time12h' ] = 'Ingrese la hora en formato AM \/ PM de 12 horas (por ejemplo, 8:45 AM).';\r\n \r\n        \/\/ Valid 24h time format\r\n        $strings[ 'val_time24h' ] = 'Ingrese la hora en formato de 24 horas (por ejemplo, 22:45).';\r\n \r\n        \/\/ Limit hours text 'Please enter time between...'\r\n        $strings[ 'val_time_limit' ] = 'Ingrese el tiempo entre {minTime} y {maxTime}.';\r\n \r\n        \/\/ Payment required text\r\n        $strings[ 'val_requiredpayment' ] = 'Se requiere pago.';\r\n \r\n        \/\/ Valid credit card number\r\n        $strings[ 'val_creditcard' ] = 'Por favor, introduzca un n\u00famero de tarjeta de cr\u00e9dito v\u00e1lida.';\r\n \r\n        \/\/ Maximum size limit reached text\r\n        $strings[ 'val_post_max_size' ] = 'El tama\u00f1o total de los archivos seleccionados {totalSize} Mb excede el l\u00edmite permitido {maxSize} Mb.';\r\n \r\n        \/\/ Password strength text\r\n        $strings[ 'val_password_strength' ] = 'Se requiere una contrase\u00f1a m\u00e1s fuerte. Considere el uso de letras may\u00fasculas y min\u00fasculas, n\u00fameros y s\u00edmbolos.';\r\n \r\n        \/\/ Valid unique value required\r\n        $strings[ 'val_unique' ] = 'El valor debe ser \u00fanico.';\r\n \r\n        \/\/ reCAPTCHA failed message text\r\n        $strings[ 'val_recaptcha_fail_msg' ] = 'La verificaci\u00f3n de Google reCAPTCHA fall\u00f3, int\u00e9ntalo de nuevo m\u00e1s tarde.';\r\n \r\n    break;\r\n    }\r\n \r\nreturn $strings;\r\n \r\n}\r\n \r\nadd_filter( 'wpforms_frontend_strings', 'wpforms_dev_frontend_strings', 20, 1 );\r\n","note":"When you need to provide multiple different language translations, these messages need to be conditionally...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":30091,"title":"Conditionally show the submit button","code":"\/**\r\n * Conditionally show the submit button\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-conditionally-show-the-submit-button\/\r\n *\/\r\n  \r\nadd_action( 'wp_head', function () { ?>\r\n   \r\n    <style>\r\n  \r\n    \/* CSS hide submit button on page load *\/\r\n    #wpforms-form-1000 .wpforms-submit-container .wpforms-submit {\r\n            visibility:hidden;\r\n        }\r\n  \r\n    #wpforms-form-1000 .wpforms-submit-container .wpforms-submit.show-submit {\r\n            visibility:visible;\r\n        }\r\n   \r\n    <\/style>\r\n   \r\n<?php } );\r\n   \r\n   \r\n\/\/ Conditional logic for Submit button\r\nfunction wpf_dev_form_redirect() {\r\n    ?>\r\n    <script>\r\n        jQuery(function($){\r\n            $( \"form#wpforms-form-1000\" ).click(function(){\r\n                var selectedval = $( \".wpforms-form input[type='radio']:checked\" ).val();\r\n                if(selectedval == \"No\"){\r\n                    window.location = \"\/thank-you\";\r\n                }\r\n                if(selectedval == \"Yes\"){\r\n                    $( \".wpforms-submit\" ).addClass( \"show-submit\" );\r\n                }\r\n            });\r\n        });\r\n    <\/script>\r\n    <?php\r\n}\r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_form_redirect', 10 );","note":"","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":19071,"title":"Create a Smart Tag for the Current Time","code":"\/**\r\n * Create a custom Smart Tag \r\n   \r\n   Original doc link: https:\/\/wpforms.com\/developers\/how-to-create-a-smart-tag-for-the-current-time\/\r\n\r\n   For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_register_smarttag( $tags ) {\r\n  \r\n    \/\/ Key is the tag, item is the tag name.\r\n    $tags[ 'current_time' ] = 'Current Time';\r\n     \r\n    return $tags;\r\n}\r\n  \r\nadd_filter( 'wpforms_smart_tags', 'wpf_dev_register_smarttag' );\r\n  \r\n  \r\n\/**\r\n * Process the Smart Tag.\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-create-a-smart-tag-for-the-current-time\r\n *\/\r\n \r\nfunction wpf_dev_process_smarttag( $content, $tag ) {\r\n  \r\n    \/\/ Only run if it is our desired tag.\r\n    if ( 'current_time' === $tag ) {\r\n         \r\n        date_default_timezone_set( 'US\/Eastern' );\r\n         \r\n        $link = date( 'h:i:s A' );\r\n         \r\n        \/\/ Replace the tag with our link.\r\n        $content = str_replace( '{current_time}', $link, $content );\r\n    }\r\n  \r\n    return $content;\r\n}\r\n  \r\nadd_filter( 'wpforms_smart_tag_process', 'wpf_dev_process_smarttag', 10, 2 );\r\n","note":"This snippet will create a new Smart Tag for you that you can use anywhere...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":23363,"title":"Create Additional Formats for the Date Field","code":"\/* \r\nAdd additional formats for the Date field Date Picker. \r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-create-additional-formats-for-the-date-field\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n \r\nfunction wpf_dev_date_field_formats( $formats ) {\r\n  \r\n    \/\/ Item key is JS date character - see https:\/\/flatpickr.js.org\/formatting\/\r\n    \/\/ Item value is in PHP format - see http:\/\/php.net\/manual\/en\/function.date.php\r\n  \r\n    \/\/ Adds new format Monday, 20th of December 2021\r\n    $formats[ 'l, J \\of F Y' ] = 'l, jS \\of F Y';\r\n\t$formats[ 'l, J F Y' ] = 'l, jS F Y';\r\n\t$formats[ 'j-m-y' ] = 'j-m-y';\r\n  \r\n    return $formats;\r\n}\r\n  \r\nadd_filter( 'wpforms_datetime_date_formats', 'wpf_dev_date_field_formats', 10, 1 );","note":"Add custom date formats to the Date field in WPForms.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":13431,"title":"Create Additional Schemes for the Address Field","code":"\/**\r\n * WPForms Add new address field scheme (Canada)\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/create-additional-schemes-for-the-address-field\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_new_address_scheme( $schemes ) {\r\n \r\n    $schemes[ 'canada' ] = array(\r\n        'label' => 'Canada',\r\n        'address1_label' => 'Address Line 1',\r\n        'address2_label' => 'Address Line 2',\r\n        'city_label' => 'City',\r\n        'postal_label' => 'Code Postal',\r\n        'state_label' => 'Province',\r\n        'states' => array(\r\n            'BC' => 'British Columbia',\r\n            'ON' => 'Ontario',\r\n            'QC' => 'Quebec',\r\n            'AB' => 'Alberta',\r\n            'MB' => 'Manitoba',\r\n            'NB' => 'New Brunswick',\r\n            'NL' => 'Newfoundland and Labrador',\r\n            'NT' => 'Northwest Territories',\r\n            'NS' => 'Nova Scotia',\r\n            'NU' => 'Nunavut',\r\n            'PE' => 'Prince Edward Island',\r\n            'SK' => 'Saskatchewan',\r\n            'YT' => 'Yukon',\r\n            ),\r\n    );\r\n \r\n    return $schemes;\r\n \r\n}\r\n \r\nadd_filter( 'wpforms_address_schemes', 'wpf_dev_new_address_scheme', 10, 1);\r\n","note":"This snippet will show you how to create your own Scheme for the Address field....","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":22950,"title":"Creating Multi-Column Form Layouts With CSS Classes","code":"\/* \r\nMulti-column layout with conditional fields\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/docs\/how-to-create-multi-column-form-layouts-in-wpforms\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n.wpforms-conditional-hide {\r\ndisplay: block !important;\r\nheight: 0 !important;\r\npadding: .01px !important;\r\n}\r\n \r\n.wpforms-conditional-hide * {\r\nvisibility: hidden !important;\r\n}","note":"If you use a multi-column layout with conditional fields, any fields that are conditionally shown...","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":[],"max_version":""},{"library_id":21212,"title":"Custom Template File Hook","code":"\/\/ Add Custom Template File\r\ninclude_once( get_stylesheet_directory() . '\/wpforms-custom-templates.php' );","note":"This is the hook you will need in order to add custom form templates to...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":23029,"title":"Decrease the retention period to one week for the Action Scheduler","code":"\/* \r\nDecrease the retention period to one week for the Action Scheduler\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/docs\/how-to-troubleshoot-action-scheduler-issues-in-wpforms\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nfunction custom_as_retention_period() {\r\n    return WEEK_IN_SECONDS;\r\n}\r\nadd_filter( 'action_scheduler_retention_period', 'custom_as_retention_period' );","note":"By default, Action Scheduler will automatically remove completed tasks after thirty days. However, this time...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6191,"title":"Defer the reCAPTCHA Script","code":"\/**\r\n * Defer the reCAPTCHA script until after the page loads\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/how-to-defer-the-recaptcha-script\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nfunction wpf_recaptcha_add_async_defer( $tag, $handle ) {\r\n \r\n            if ( strpos( $tag, 'recaptcha\/api.js?onload=wpformsRecaptchaLoad' ) !== false ) {\r\n                $tag = str_replace( ' src', ' defer async=\"async\" src', $tag );\r\n            }\r\n \r\n            return $tag;\r\n \r\n        }\r\n \r\nadd_filter( 'script_loader_tag', 'wpf_recaptcha_add_async_defer', 10, 2 );\r\n","note":"Defers the reCAPTCHA script until after the page finishes loading.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["recaptcha"],"max_version":""},{"library_id":13524,"title":"Disable a Form Field to Prevent User Input","code":"\/**\r\n * Make standard form fields to make read-only\r\n * To apply, add CSS class 'wpf-disable-field' (no quotes) to field in form builder\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/disable-a-form-field-to-prevent-user-input\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_disable_field() {\r\n    ?>\r\n    <script type=\"text\/javascript\">\r\n \r\n    jQuery(function($) {\r\n \r\n        $( '.wpf-disable-field input, .wpf-disable-field textarea' ).attr({\r\n             readonly: \"readonly\",\r\n             tabindex: \"-1\"\r\n        });\r\n         \r\n    });\r\n \r\n    <\/script>\r\n    <?php\r\n}\r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_disable_field', 30 );","note":"This snippet will render any Single Line Text or Paragraph Text field as read-only which...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6149,"title":"Disable Enter Key in WPForms","code":"\/**\r\n * Disable the Enter key for WPForms forms\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-stop-the-enter-key-from-submitting-the-form\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_disable_enter_all_wpforms( ) {\r\n?>\r\n \r\n    <script type=\"text\/javascript\">\r\n         \r\n        \/\/ Run this snippet on all WPForms forms\r\n        jQuery( 'form.wpforms-form' ).bind( 'keypress keydown keyup', function(e) {\r\n            if (e.keyCode == 13) {\r\n                e.preventDefault();\r\n            }\r\n        });\r\n         \r\n    <\/script>\r\n \r\n<?php\r\n}\r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_disable_enter_all_wpforms', 30 );","note":"Disables the Enter key for all forms created with WPForms.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6175,"title":"Disable the Email Address Suggestion","code":"\/**\r\n * Disable the email address suggestion\r\n *\r\n * @link  https:\/\/wpforms.com\/developers\/how-to-disable-the-email-suggestion-on-the-email-form-field\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nadd_filter( 'wpforms_mailcheck_enabled', '__return_false' );","note":"Disables email address suggestion in the Email field.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6176,"title":"Display Empty Form Fields in Email Notifications","code":"\/**\r\n * Show empty form fields in email notifications\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-show-empty-form-fields-in-email-notifications\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nadd_filter( 'wpforms_email_display_empty_fields', '__return_true' );\r\n","note":"Displays all fields in the email notifications including empty fields.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["notifications"],"max_version":""},{"library_id":13447,"title":"Display Entry Submissions Count for a Specific Form","code":"\/**\r\n * Shortcode that displays the number of completed entries for a form.\r\n *\r\n * Usage:  [wpforms_entry_total form_id=\"X\"] - X is the form ID.\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/display-entry-submissions-count-for-a-specific-form\/\r\n *\/\r\n \r\nfunction wpf_dev_form_entry_total( $atts ) {\r\n \r\n    $args = shortcode_atts( array(\r\n        'form_id' => ''\r\n    ), $atts );\r\n \r\n    if ( empty( $atts[ 'form_id' ] ) ) {\r\n        return;\r\n    }\r\n \r\n    $total = wpforms()->entry->get_entries( array( 'form_id' => $atts[ 'form_id' ] ), true );\r\n \r\n    return absint( $total );\r\n}\r\nadd_shortcode( 'wpforms_entry_total', 'wpf_dev_form_entry_total' );\r\n","note":"Displays how many entries a specific form has received using a shortcode. Once this snippet...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6182,"title":"Display Form After Confirmation","code":"\/**\r\n * Display form after confirmation\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-display-the-confirmation-and-the-form-again-after-submission\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n  \r\nfunction wpf_dev_frontend_output_success(  $form_data, $fields, $entry_id ) {\r\n       \r\n    \/\/ Only process this snippet on form ID 999999\r\n    \/\/ To find your form or field ID, visit https:\/\/wpforms.com\/developers\/how-to-locate-form-id-and-field-id\/\r\n    if ( absint( $form_data[ 'id' ] ) !== 999999 ) {\r\n        return;\r\n    }\r\n                \/\/ Reset the fields to blank\r\n        unset(\r\n            $_GET[ 'wpforms_return' ],\r\n            $_POST[ 'wpforms' ][ 'id' ]\r\n        );\r\n \r\n        \/\/ Uncomment this line out if you want to clear the form field values after submission\r\n        unset( $_POST[ 'wpforms' ][ 'fields' ] );\r\n \r\n        \/\/ Actually render the form.\r\n        wpforms()->frontend->output( $form_data[ 'id' ] );\r\n  \r\n}\r\n \r\nadd_action( 'wpforms_frontend_output_success', 'wpf_dev_frontend_output_success', 10, 3 );\r\n","note":"Displays the form again after submission and below the confirmation message. Change the 999999 to...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["after-submission"],"max_version":""},{"library_id":6193,"title":"Display Form Entries","code":"\/**\r\n * Custom shortcode to display WPForms form entries in table view\r\n *\r\n * Basic usage: [wpforms_entries_table id=\"FORMID\"]\r\n * \r\n * @link   https:\/\/wpforms.com\/developers\/how-to-display-form-entries\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nfunction wpf_entries_table( $atts ) {\r\n  \r\n    \/\/ Pull ID shortcode attributes.\r\n    $atts = shortcode_atts(\r\n        [\r\n            'id'     => '',\r\n            'user'   => '',\r\n            'fields' => '',\r\n            'number' => '',\r\n            'type'   => 'all', \/\/ all, unread, read, or starred.\r\n            'sort'   => '',\r\n            'order'  => 'asc',\r\n        ],\r\n        $atts\r\n    );\r\n  \r\n    \/\/ Check for an ID attribute (required) and that WPForms is in fact\r\n    \/\/ installed and activated.\r\n    if ( empty( $atts[ 'id' ] ) || ! function_exists( 'wpforms' ) ) {\r\n        return;\r\n    }\r\n  \r\n    \/\/ Get the form, from the ID provided in the shortcode.\r\n    $form = wpforms()->form->get( absint( $atts[ 'id' ] ) );\r\n  \r\n    \/\/ If the form doesn't exists, abort.\r\n    if ( empty( $form ) ) {\r\n        return;\r\n    }\r\n  \r\n    \/\/ Pull and format the form data out of the form object.\r\n    $form_data = ! empty( $form->post_content ) ? wpforms_decode( $form->post_content ) : '';\r\n  \r\n    \/\/ Check to see if we are showing all allowed fields, or only specific ones.\r\n    $form_field_ids = isset( $atts[ 'fields' ] ) && $atts[ 'fields' ] !== '' ? explode( ',', str_replace( ' ', '', $atts[ 'fields' ] ) ) : [];\r\n  \r\n    \/\/ Setup the form fields.\r\n    if ( empty( $form_field_ids ) ) {\r\n        $form_fields = $form_data[ 'fields' ];\r\n    } else {\r\n        $form_fields = [];\r\n        foreach ( $form_field_ids as $field_id ) {\r\n            if ( isset( $form_data[ 'fields' ][ $field_id ] ) ) {\r\n                $form_fields[ $field_id ] = $form_data[ 'fields' ][ $field_id ];\r\n            }\r\n        }\r\n    }\r\n  \r\n    if ( empty( $form_fields ) ) {\r\n        return;\r\n    }\r\n  \r\n    \/\/ Here we define what the types of form fields we do NOT want to include,\r\n    \/\/ instead they should be ignored entirely.\r\n    $form_fields_disallow = apply_filters( 'wpforms_frontend_entries_table_disallow', [ 'divider', 'html', 'pagebreak', 'captcha' ] );\r\n  \r\n    \/\/ Loop through all form fields and remove any field types not allowed.\r\n    foreach ( $form_fields as $field_id => $form_field ) {\r\n        if ( in_array( $form_field[ 'type' ], $form_fields_disallow, true ) ) {\r\n            unset( $form_fields[ $field_id ] );\r\n        }\r\n    }\r\n  \r\n    $entries_args = [\r\n        'form_id' => absint( $atts[ 'id' ] ),\r\n    ];\r\n  \r\n    \/\/ Narrow entries by user if user_id shortcode attribute was used.\r\n    if ( ! empty( $atts[ 'user' ] ) ) {\r\n        if ( $atts[ 'user' ] === 'current' && is_user_logged_in() ) {\r\n            $entries_args[ 'user_id' ] = get_current_user_id();\r\n        } else {\r\n            $entries_args[ 'user_id' ] = absint( $atts[ 'user' ] );\r\n        }\r\n    }\r\n  \r\n    \/\/ Number of entries to show. If empty, defaults to 30.\r\n    if ( ! empty( $atts[ 'number' ] ) ) {\r\n        $entries_args[ 'number' ] = absint( $atts[ 'number' ] );\r\n    }\r\n  \r\n    \/\/ Filter the type of entries all, unread, read, or starred\r\n    if ( $atts[ 'type' ] === 'unread' ) {\r\n        $entries_args[ 'viewed' ] = '0';\r\n    } elseif( $atts[ 'type' ] === 'read' ) {\r\n        $entries_args[ 'viewed' ] = '1';\r\n    } elseif ( $atts[ 'type' ] === 'starred' ) {\r\n        $entries_args[ 'starred' ] = '1';\r\n    }\r\n  \r\n    \/\/ Get all entries for the form, according to arguments defined.\r\n    \/\/ There are many options available to query entries. To see more, check out\r\n    \/\/ the get_entries() function inside class-entry.php (https:\/\/a.cl.ly\/bLuGnkGx).\r\n    $entries = json_decode(json_encode(wpforms()->entry->get_entries( $entries_args )), true);\r\n  \r\n    if ( empty( $entries ) ) {\r\n        return '<p>No entries found.<\/p>';\r\n    }\r\n     \r\n    foreach($entries as $key => $entry) {\r\n        $entries[$key][ 'fields' ] = json_decode($entry[ 'fields' ], true);\r\n        $entries[$key][ 'meta' ] = json_decode($entry[ 'meta' ], true);\r\n    }\r\n     \r\n    if ( !empty($atts[ 'sort' ]) && isset($entries[0][ 'fields' ][$atts[ 'sort' ]] ) ) {\r\n        if ( strtolower($atts[ 'order' ]) == 'asc' ) {\r\n            usort($entries, function ($entry1, $entry2) use ($atts) {\r\n                return strcmp($entry1[ 'fields' ][$atts[ 'sort' ]][ 'value' ], $entry2[ 'fields' ][$atts[ 'sort' ]][ 'value' ]);\r\n            });         \r\n        } elseif ( strtolower($atts[ 'order' ]) == 'desc' ) {\r\n            usort($entries, function ($entry1, $entry2) use ($atts) {\r\n                return strcmp($entry2[ 'fields' ][$atts[ 'sort' ]][ 'value' ], $entry1[ 'fields' ][$atts[ 'sort' ]]['value']);\r\n            });\r\n        }\r\n    }\r\n     \r\n    ob_start();\r\n  \r\n    echo '<table class=\"wpforms-frontend-entries\">';\r\n  \r\n        echo '<thead><tr>';\r\n  \r\n            \/\/ Loop through the form data so we can output form field names in\r\n            \/\/ the table header.\r\n            foreach ( $form_fields as $form_field ) {\r\n  \r\n                \/\/ Output the form field name\/label.\r\n                echo '<th>';\r\n                    echo esc_html( sanitize_text_field( $form_field[ 'label' ] ) );\r\n                echo '<\/th>';\r\n            }\r\n  \r\n        echo '<\/tr><\/thead>';\r\n  \r\n        echo '<tbody>';\r\n  \r\n            \/\/ Now, loop through all the form entries.\r\n            foreach ( $entries as $entry ) {\r\n  \r\n                echo '<tr>';\r\n  \r\n                $entry_fields = $entry[ 'fields' ];\r\n  \r\n                foreach ( $form_fields as $form_field ) {\r\n  \r\n                    echo '<td>';\r\n  \r\n                        foreach ( $entry_fields as $entry_field ) {\r\n                            if ( absint( $entry_field[ 'id' ] ) === absint( $form_field[ 'id' ] ) ) {\r\n                                echo apply_filters( 'wpforms_html_field_value', wp_strip_all_tags( $entry_field[ 'value' ] ), $entry_field, $form_data, 'entry-frontend-table' );\r\n                                break;\r\n                            }\r\n                        }\r\n  \r\n                    echo '<\/td>';\r\n                }\r\n  \r\n                echo '<\/tr>';\r\n            }\r\n  \r\n        echo '<\/tbody>';\r\n  \r\n    echo '<\/table>';\r\n  \r\n    $output = ob_get_clean();\r\n  \r\n    return $output;\r\n}\r\nadd_shortcode( 'wpforms_entries_table', 'wpf_entries_table' );","note":"Displays form entries on the front end of your site. Once this snippet is added...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["display-entries"],"max_version":""},{"library_id":6177,"title":"Display Non-Input Fields in Notifications","code":"\/**\r\n * Filters non-input field types to include in {all_fields} output\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/include-page-break-section-divider-and-html-fields-in-notifications\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_email_display_other_fields( $fields ) {\r\n \r\n    return array( 'divider', 'pagebreak', 'html', 'content' );\r\n}\r\n \r\nadd_filter( 'wpforms_email_display_other_fields', 'wpf_dev_email_display_other_fields', 10, 1 );\r\n","note":"Displays all non-input fields in email notifications. Non-input fields are HTML fields, Page Breaks, Section...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["notifications"],"max_version":""},{"library_id":6189,"title":"Display Shortcodes Inside HTML Fields","code":"\/**\r\n * Run shortcodes on HTML field content\r\n *\r\n * @link   https:\/\/wpforms.com\/developers\/how-to-display-shortcodes-inside-the-html-field\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nfunction wpf_dev_html_field_shortcodes( $field, $field_atts, $form_data ) {\r\n \r\n    if ( ! empty( $field[ 'code' ] ) ) {\r\n        $field[ 'code' ] = do_shortcode( $field[ 'code' ] );\r\n    }\r\n \r\n    return $field;\r\n}\r\nadd_filter( 'wpforms_html_field_display', 'wpf_dev_html_field_shortcodes', 10, 3 );\r\n","note":"Allows shortcodes to be processed within HTML fields by applying do_shortcode() to the field content.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["html-field"],"max_version":""},{"library_id":14932,"title":"Enable Legacy Email Templates","code":"\/**\r\n * Revert to legacy 'HTML' email template, v1.8.4 and below\r\n * \r\n * @link   https:\/\/wpforms.com\/developers\/how-to-enable-legacy-email-template\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\n$settings = (array) get_option( 'wpforms_settings', [] );\r\n$settings[ 'email-template' ] = 'default';\r\nupdate_option( 'wpforms_settings', $settings );","note":"This snippet will allow the ability to select Legacy from the WPForms >> Settings >>...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":23032,"title":"Force WPForms to use modern markup","code":"\/* \r\nAdding a background image to your forms.\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/docs\/styling-your-forms\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nadd_filter( 'wpforms_admin_settings_modern_markup_register_field_is_disabled', '__return_false' );","note":"If using the deprecated Credit Card field prevents you from enabling modern markup, you can...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":17686,"title":"Hide the Submit Button on Calculator Forms","code":"\/**\r\n * For the Accordion Template, this is a helper script\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\n   \/* CSS hide submit button for any calculator only forms *\/\r\nbutton.wpf-calc-form {\r\n\t\tvisibility: hidden;\r\n    }","note":"To use any of the Calculator forms but want to hide the submit button. Use...","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":[],"max_version":""},{"library_id":23026,"title":"How to Add Custom Code Snippets in WordPress","code":"\r\n\/* \r\nModify the login URL to redirect to a custom login page.\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/how-to-add-custom-code-snippets-in-wordpress\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n.wpforms-container input[type=radio] {\r\n    -webkit-appearance: radio !important;\r\n    -moz-appearance: radio !important;\r\n    appearance: radio !important;\r\n}\r\n \r\n.wpforms-container input[type=checkbox] {\r\n    -webkit-appearance: checkbox !important;\r\n    -moz-appearance: checkbox !important;\r\n    appearance: checkbox !important;\r\n}\r\n \r\n.wpforms-container input[type=radio]:checked:before,\r\n.wpforms-container input[type=radio]:before,\r\n.wpforms-container input[type=checkbox]:checked:before,\r\n.wpforms-container input[type=checkbox]:before,\r\n.wpforms-container input[type=radio]:checked:after,\r\n.wpforms-container input[type=radio]:after,\r\n.wpforms-container input[type=checkbox]:checked:after,\r\n.wpforms-container input[type=checkbox]:after {\r\n    display: none !important;\r\n}","note":"For this guide, we\u2019ll create a custom code that prevents theme conflicts that cause Radio...","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":[],"max_version":""},{"library_id":19033,"title":"Include Field Descriptions Inside Email Notifications","code":"\/* \r\nInclude field descriptions inside email notifications\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-include-field-descriptions-inside-email-notifications\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nfunction wpf_dev_html_field_value( $field_val, $field, $form_data, $context ) {\r\n   \r\n    if ( $context !== 'email-html' ) {\r\n        return $field_val;\r\n    }\r\n \r\n    if ( empty( $form_data[ 'fields' ][ $field[ 'id' ] ] ) ) {\r\n        return $field_val;\r\n    }\r\n \r\n    $field_data = $form_data[ 'fields' ][ $field[ 'id' ] ];\r\n \r\n    if ( empty( $field_data[ 'description' ] ) ) {\r\n        return $field_val;\r\n    }\r\n \r\n    return $field_val . '<p>' . $field_data[ 'description' ] . '<\/p>';\r\n \r\n}\r\nadd_filter( 'wpforms_html_field_value', 'wpf_dev_html_field_value', 20, 4 );","note":"This snippet will have all field descriptions from all forms included in the email notifications.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":23135,"title":"Increase the max file size limit in WordPress","code":"\/* \r\nIncrease WordPress upload size, post size, and max execution time \r\n\r\nOriginal doc link: https:\/\/wpforms.com\/how-to-change-max-file-upload-size-in-wordpress\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n@ini_set( 'upload_max_size' , '256M' );\r\n@ini_set( 'post_max_size', '256M');\r\n@ini_set( 'max_execution_time', '300' );","note":"Using a small snippet, we're going to increase the upload size, post size, and max...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":30011,"title":"Increment a Count on Each Form Submission","code":"\/**\r\n * Increment total entry number on each submission\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-increment-a-count-on-each-form-submission\r\n *\/\r\n \r\nfunction wpf_dev_update_total_field( $fields, $entry, $form_data ) {\r\n     \r\n\t$my_form_id = 1000; \/\/ Form ID to track\r\n    if( $form_data[ 'id' ] != $my_form_id ) {\r\n        return $fields;\r\n    }\r\n     \r\n    $my_field_id = 15; \/\/ Hidden field ID to store count\r\n \r\n    $min_digits = 6; \/\/Minimum digits in counter\r\n     \r\n    \/\/ Count the entries and increment the hidden field count by 1 on each submit\r\n    $total_entries = wpforms()->entry->get_entries( array( 'form_id' => $my_form_id ), true );\r\n    $new_total_entries = $total_entries + 1;\r\n     \r\n    \/\/ Add leading zeros and update field\r\n    $fields[ $my_field_id ][ 'value' ] = zeroise($new_total_entries, $min_digits);\r\n  \r\n    return $fields;\r\n  \r\n}\r\nadd_filter( 'wpforms_process_filter', 'wpf_dev_update_total_field', 10, 3 );","note":"This snippet counts the total entries for a specific form and updates a hidden field...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["wpforms"],"max_version":""},{"library_id":24034,"title":"Limit Post Revisions","code":"define( 'WP_POST_REVISIONS', 4 );","note":"This snippet will limit the post revisions storage memory to 4. To get started, you\u2019ll...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":13475,"title":"Limit Range Allowed in Numbers Field","code":"\/**\r\n * Limit number range allowed for a Numbers field\r\n * Apply the class \"wpf-num-limit\" to the field to enable.\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-limit-range-allowed-in-numbers-field\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n  \r\nfunction wpf_dev_num_limit() {\r\n    ?>\r\n    <script type=\"text\/javascript\">\r\n        jQuery(function(){\r\n \r\n            \/\/ Enter 5 minimum (5) and maximum (20) amount for the number field \r\n            jQuery( '.wpf-num-limit input' ).attr({ 'min':5, 'max':20 } ); \r\n        });\r\n  \r\n    <\/script>\r\n    <?php\r\n}\r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_num_limit', 30 );","note":"This snippet will allow you to add a CSS class to any Number field and...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":22951,"title":"Limiting Options for the Date \/ Time Field","code":"\/** \r\nDon't allow date to be selected after maxDate \r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/customize-the-date-time-field-date-options\/ \r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nfunction wpf_dev_limit_date_picker() { \r\n   ?> \r\n   <script type=\"text\/javascript\"> \r\n\t   \r\n\t  \/\/ Run this snippet on form ID 323 and field ID 4 \r\n      window.wpforms_323_4 = window.wpforms_323_4 || {};\r\n      window.wpforms_323_4.datepicker = { \r\n        disableMobile: true, \r\n        \/\/ Don't allow users to pick past dates \r\n        maxDate: new Date(), \r\n      } \r\n   <\/script> \r\n \r\n   <?php \r\n} \r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_limit_date_picker', 10 );\r\n","note":"This snippet will disable any future date in your date picker. You'll need to update...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":21213,"title":"Loading custom templates","code":"\/**\r\n * Plugin Name: WPForms Custom Templates\r\n * Description: This plugin loads custom form templates.\r\n * Version:     1.0.0\r\n *\/\r\n \r\n\/**\r\n * Load the templates.\r\n *\/\r\nfunction wpf_load_custom_templates() {\r\n \r\n    \/\/ Template code here\r\n \r\n}\r\nadd_action( 'wpforms_loaded', 'wpf_load_custom_templates' );","note":"Add the code for your custom template to this snippet to load it in the...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6173,"title":"Position the Field Description Above the Form Field","code":"\/**\r\n * Move the field description above the form field\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-position-the-field-description-above-the-form-field\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nfunction wpf_dev_field_properties( $properties, $field, $form_data ) {\r\n     \r\n    \/\/ Only process this snippet on form ID 999999\r\n    \/\/ To find your form or field ID, visit https:\/\/wpforms.com\/developers\/how-to-locate-form-id-and-field-id\/\r\n    if ( absint( $form_data[ 'id' ] ) !== 999999 ) {\r\n        return $properties;\r\n    } \r\n     \r\n    {\r\n        \/\/ Position the field description above the form field\r\n        $properties[ 'description' ][ 'position' ] = 'before';\r\n    }\r\n \r\n    return $properties;\r\n}\r\nadd_filter( 'wpforms_field_properties', 'wpf_dev_field_properties', 10, 3 );\r\n","note":"Positions the field description above the form field. Change the 999999 to match your own...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["field-description"],"max_version":""},{"library_id":24033,"title":"Reduce Database Calls","code":"\/* \r\nIncrease WordPress upload size, post size, and max execution time \r\n\r\nOriginal doc link: https:\/\/wpforms.com\/how-to-change-max-file-upload-size-in-wordpress\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" dir=\"ltr\">\r\n<head profile=\"http:\/\/gmpg.org\/xfn\/11\">\r\n<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\" \/>","note":"You can edit your child theme and replace these calls with more specific information to...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6148,"title":"Remove Confirmation Message Box Styling","code":"\/* \r\nRemove Confirmation Message Box Styling\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-remove-confirmation-message-box-styling\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n.wpforms-confirmation-container-full {\r\n    color: inherit !important;\r\n    margin: 0 !important;\r\n    background: none !important;\r\n    border: none !important;\r\n    padding: 0 !important;\r\n}","note":"Removes the background color and border from the form confirmation message.","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":["styling"],"max_version":""},{"library_id":23133,"title":"Remove Line Breaks From CSV Exports","code":"\/* \r\nInclude field descriptions inside email notifications\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-include-field-descriptions-inside-email-notifications\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nfunction wpf_dev_remove_line_breaks_csv( $export_data, $request_data, $entry ) {\r\n     \r\n    array_walk(\r\n         $export_data,\r\n         static function( &$row ) {\r\n            $row = str_replace( \"\\n\", ' ', $row );\r\n         }\r\n      );\r\n  \r\n      return $export_data;\r\n     \r\n}\r\nadd_filter( 'wpforms_pro_admin_entries_export_ajax_get_entry_data', 'wpf_dev_remove_line_breaks_csv', 10, 3 );\r\n","note":"This snippet will remove the line breaks from CSV exports.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6184,"title":"Remove the Arrows on the Numbers Field","code":"\/* \r\nRemove the arrows in the Numbers form field\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-remove-the-arrows-on-the-numbers-field\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\ninput[type=\"number\"]::-webkit-outer-spin-button, input[type=\"number\"]::-webkit-inner-spin-button {\r\n    -webkit-appearance: none !important;\r\n    margin: 0 !important;\r\n}\r\n  \r\ninput[type=\"number\"] {\r\n    -moz-appearance: textfield !important;\r\n}","note":"Removes the arrows inside the Numbers form field.","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":["numbers-field","styling"],"max_version":""},{"library_id":13525,"title":"Remove the Key Text on Conversational Forms","code":"\/* \r\nRemove the Key Text from Conversational Forms\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-change-the-key-text-on-conversational-forms\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n#wpforms-conversational-form-page div[class^='wpforms-field-'] li:not(.wpforms-image-choices-item) label:before,\r\n#wpforms-conversational-form-page div[class*=' wpforms-field-'] li:not(.wpforms-image-choices-item) label:before,\r\n#wpforms-conversational-form-page div[class^='wpforms-field-'] li:not(.wpforms-image-choices-item):not(.wpforms-selected) label:hover:before,\r\n#wpforms-conversational-form-page div[class*=' wpforms-field-'] li:not(.wpforms-image-choices-item):not(.wpforms-selected) label:hover:before,\r\n#wpforms-conversational-form-page div[class^='wpforms-field-'] li:not(.wpforms-image-choices-item):not(.wpforms-selected) label.wpforms-field-item-hover:before,\r\n#wpforms-conversational-form-page div[class*=' wpforms-field-'] li:not(.wpforms-image-choices-item):not(.wpforms-selected) label.wpforms-field-item-hover:before,\r\n#wpforms-conversational-form-page div[class^='wpforms-field-'] li:not(.wpforms-image-choices-item).wpforms-selected label:before,\r\n#wpforms-conversational-form-page div[class*=' wpforms-field-'] li:not(.wpforms-image-choices-item).wpforms-selected label:before {\r\n  content:none;\r\n}\r\n \r\n#wpforms-conversational-form-page div[class^='wpforms-field-'] li:not(.wpforms-image-choices-item) label,\r\n#wpforms-conversational-form-page div[class*=' wpforms-field-'] li:not(.wpforms-image-choices-item) label {\r\n  padding: 9px 9px 9px 9px;\r\n}","note":"This CSS will remove the Key Text on all Conversational Forms.","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":[],"max_version":""},{"library_id":6188,"title":"Set Default Date for Date Picker","code":"\/**\r\n * Sets a default date for Date Picker\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-set-a-default-date-for-your-date-picker-form-field\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n\r\nfunction wpf_dev_date_picker_default() {\r\n    ?>\r\n \r\n    <script type=\"text\/javascript\">\r\n \r\n        window.wpforms_datepicker = {\r\n \r\n            defaultDate: \"today\",\r\n            disableMobile: \"true\"\r\n \r\n        }\r\n \r\n    <\/script>\r\n \r\n    <?php\r\n}\r\n \r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_date_picker_default', 30 );","note":"Sets a default date for your Date Picker form field.","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["date-picker","default-date"],"max_version":""},{"library_id":6174,"title":"Set the Language for Google reCAPTCHA","code":"\/**\r\n * Set the language reCAPTCHA\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-set-the-language-for-google-recaptcha\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n \r\nfunction wpf_dev_recaptcha_language( $url ) {\r\n \r\n        \/\/ Set the language code to FR (French)\r\n        \/\/ To find your language code, please visit https:\/\/developers.google.com\/recaptcha\/docs\/language\r\n    return esc_url_raw( add_query_arg( array( 'hl' => 'fr '), $url ) );\r\n}\r\n \r\nadd_filter( 'wpforms_frontend_recaptcha_url', 'wpf_dev_recaptcha_language', 10, 1);\r\n","note":"Changes the language when using reCAPTCHA. You'll just need to update the language code. To...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":["language","recaptcha"],"max_version":""},{"library_id":13471,"title":"Skip Page Breaks When Using Conditional Logic","code":"\/**\r\n * Skip empty page breaks if the condition is not met\r\n *\r\n * @link https:\/\/wpforms.com\/developers\/how-to-skip-page-breaks-when-using-conditional-logic\/\r\n * \r\n * For support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n *\/\r\n  \r\nfunction wpf_dev_skip_empty_pages() {\r\n?>\r\n    \r\n<script type=\"text\/javascript\">\r\n    \r\n    jQuery(function($){\r\n           \r\n        \/\/ Initialize the empty action to track which button was clicked (prev\/next)\r\n        var action = \"\";\r\n           \r\n        \/\/ When next\/prev button is clicked, store the action so we know which direction to skip\r\n        $( document ).on( 'click', '.wpforms-page-button', function( event ) {\r\n            action = $(this).data( 'action' );\r\n        });\r\n           \r\n        \/\/ Check if the page is empty when the page changes\r\n        $( '.wpforms-form' ).each(function() {\r\n            $(this).on( 'wpformsBeforePageChange', function(event, pageNum, form ){\r\n                  \r\n                \/\/ setTimeout({}, 0) is used so it fires asynchronously. Without this it was happening too quickly\r\n                setTimeout(function(){\r\n  \r\n                    \/\/ Assume all pages are empty so we loop through all fields on the page except for the last field which are the page buttons\r\n                    var emptyPage = true;\r\n  \r\n                    \/\/ Loop through all fields on the page\r\n                    form.find( `.wpforms-page-${pageNum} > div:not(:last)` ).each(function(){\r\n  \r\n                        \/\/ Check if current field is visible and doesn't have style=\"display:none;\"\r\n                        if ($(this).is( \":visible\" )) {\r\n  \r\n                            \/\/ Set emptyPage to false if any field is visible on the page\r\n                            emptyPage = false;\r\n  \r\n                            \/\/ Allow scrolling for pages with fields\r\n                            window.wpforms_pageScroll = true;\r\n  \r\n                            \/\/ Stop looping through fields if a field is visible\r\n                            return false;\r\n                        }\r\n                    })\r\n  \r\n                    \/\/ Run the \"click\" action on prev or next button if all fields on the page are hidden.\r\n                    if (emptyPage) {\r\n  \r\n                        \/\/ Prevent any scrolling animation from happening on empty pages\r\n                        window.wpforms_pageScroll = false;\r\n  \r\n                        \/\/ Perform the \"click\" on the appropriate button based off the saved action\r\n                        form.find( `.wpforms-page-${pageNum} .wpforms-page-${action}` ).click();\r\n                    }           \r\n                }, 0);\r\n            });\r\n        });\r\n    });\r\n    \r\n<\/script>\r\n    \r\n<?php\r\n}\r\n    \r\nadd_action( 'wpforms_wp_footer_end', 'wpf_dev_skip_empty_pages', 30 );","note":"With this snippet, any WPForms form with Conditional Logic and Page Breaks will be skipped...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":6183,"title":"Style Placeholder Text","code":"\/* \r\nStyle placeholder text\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/developers\/how-to-remove-confirmation-message-box-styling\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n.wpforms-container ::-webkit-input-placeholder { \/* Chrome and Safari *\/\r\n   color: #aaa !important;\r\n}\r\n \r\n.wpforms-container :-moz-placeholder { \/* Mozilla Firefox 4 to 18 *\/\r\n   color: #aaa !important;\r\n   opacity: 1 !important;\r\n}\r\n \r\n.wpforms-container ::-moz-placeholder { \/* Mozilla Firefox 19+ *\/\r\n   color: #aaa !important;\r\n   opacity: 1 !important;\r\n}\r\n \r\n.wpforms-container :-ms-input-placeholder { \/* Internet Explorer 10-11 *\/\r\n   color: #aaa !important;\r\n}\r\n \r\n.wpforms-container ::-ms-input-placeholder { \/* Microsoft Edge *\/\r\n   color: #aaa !important;\r\n}\r\n \r\n.wpforms-container ::placeholder {\r\n   color: #aaa !important;\r\n}","note":"Styles the placeholder text that appears inside form fields. The colors in this CSS are...","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":["placeholder","styling"],"max_version":""},{"library_id":23129,"title":"Troubleshooting Action Scheduler - access the Scheduled Actions page","code":"\/* \r\nChange the completed scheduled tasks storage to 1 week\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/docs\/how-to-troubleshoot-action-scheduler-issues-in-wpforms\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nadd_filter( 'wpforms_tasks_admin_hide_as_menu', '__return_false' );","note":"Some plugins that install the Action Scheduler library (such as the Action Scheduler plugin itself)...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":22958,"title":"Using the \u201cInclude Form Styling\u201d Setting","code":"\/* \r\nWhen using Base styling and multi-column, use this CSS to correct the column layout.\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/docs\/how-to-choose-an-include-form-styling-setting\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\n.wpforms-field {\r\n    clear: both !important;\r\n}","note":"With the Base styling only setting in place, multi-column layouts will generally not function properly....","categories":["wpforms"],"code_type":"css","needs_auth":false,"tags":[],"max_version":""},{"library_id":23031,"title":"WPForms Enable Modern Markup Settings","code":"\/* \r\nAdding a background image to your forms.\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/docs\/how-to-add-a-background-image-in-wpforms\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nadd_filter( 'wpforms_admin_settings_modern_markup_register_field_is_hidden', '__return_false' );","note":"By adding this snippet, you will be able to turn the Modern Markup settings on...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""},{"library_id":22947,"title":"WPForms Login Page Redirect","code":"\/* \r\nModify the login URL to redirect to a custom login page.\r\n\r\nOriginal doc link: https:\/\/wpforms.com\/how-to-create-a-custom-login-form-for-improved-site-branding\/\r\n\r\nFor support, please visit: https:\/\/www.facebook.com\/groups\/wpformsvip\r\n*\/\r\n\r\nfunction sulliesflowers_custom_login_url( $login_url, $redirect, $force_reauth ) {\r\n    \/\/ Change here your login page url\r\n    $login_url = 'https:\/\/sulliesflowers.com\/login\/';\r\n    \r\n    if ( ! empty( $redirect ) ) {\r\n        $login_url = add_query_arg( 'redirect_to', urlencode( $redirect ), $login_url );\r\n    }\r\n    if ( $force_reauth ) {\r\n        $login_url = add_query_arg( 'reauth', '1', $login_url );\r\n    }\r\n    return $login_url;\r\n}\r\nadd_filter( 'login_url', 'sulliesflowers_custom_login_url', 10, 3 );","note":"This snippet will redirect the default WordPress login page to your custom login page. This...","categories":["wpforms"],"code_type":"php","needs_auth":false,"tags":[],"max_version":""}]}

Zerion Mini Shell 1.0