Unable to Use multiple code snippets at the same time in WPForms

  • Unknown's avatar

    Hello , kindly solve this problem in this forum.
    I’m trying to turn off a duration in the datepicker of the date form , i did this using the code snippet in an article in wpforms. it worked good but to activate it i have to turn off ‘limit days’ and at the same time i need to turn off saturdays and sundays .
    i tried using a snippet to turn off sunday and saturday and it worked but the first snippet stopped functioning.
    any help of how i can include turning off sunday and saturday in this code?

    
    function wpf_limit_date_picker() {
        ?>
        <script type="text/javascript">
            var d = new Date();
            window.wpforms_datepicker = {
                disableMobile: false,
                // Don't allow users to pick specific range of dates
                disable: [
                    {
                        from: "2023-6-27",
                        to: "2023-7-30"
                    },{
                        from: "2023-6-7",
                        to: "2023-6-7"
                    }
                ]
            }
        </script>
    
        <?php
    }
    
    add_action( 'wpforms_wp_footer_end', 'wpf_limit_date_picker', 8071 );
    
  • Hi there,

    Hi there,

    Apologies, but we can’t help with your issue directly because we don’t host your site on our WordPress.com managed hosting.

    To explain, we are a fully managed hosting provider and use a custom server environment that is optimized for WordPress, provides built-in security and performance improvements, as well as in-house support for your site questions. You can learn more about the performance and security benefits of our managed hosting here: https://wordpress.com/hosting/

    Because of the way we’ve optimized our service, we also use a customized version of WordPress that is different (under the hood) from what you use at your current provider. As a result, we do not have access to your site and are not familiar with the source of your issue.

    You definitely have the option to move your site to us so we can provide in-house help, and we offer a migration plugin that will help you move your site to our managed hosting in just a few clicks.

    WP
    Import using Move to WordPress.com
    3 min read
    The Move to WordPress.com plugin allows you to start migrating a self-hosted WordPress site to WordPress.com directly from the self-hosted site. Prerequisites The Move to WordPress.com plugin installed on your self-hosted WordPress site. Jetpack version 7.9 or higher activated on the self-hosted site. All incompatible plugins deactivated on the self-hosted site. ✅ Th

    Unfortunately though, as it stands now, we are not able to help since it is hosted elsewhere. The issue you are referring sounds like a display issue related to your WPForms plugin however. The good news is that help is available directly from the creators of your plugin here: https://wordpress.org/support/plugin/wpforms-lite/

    Hope this helps point you in the right direction!

  • The topic ‘Unable to Use multiple code snippets at the same time in WPForms’ is closed to new replies.