• Resolved stevewild7

    (@stevewild7)


    OK love the sidebar form and works great on desktop as we have required fields etc to complete but noticed on mobile the user can complete the form miss a required field, press submit the slider slides away and the end user would not know the form is not complete and submitted,

    Any options around this ?

    thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @stevewild7,

    Thanks for contacting us,

    I hope you are doing well, We are testing on our staging site and then let you know.

    Thanks & Regards

    WP Experts Support Team

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @stevewild7,

    This is one of the possible solutions for the issue. Need to paste this code into the child theme’s function.php

    
    add_filter( 'wp_footer', 'cs_show_slider_on_gf_err', 10, 2 );
    
    function cs_show_slider_on_gf_err() {
    
    	?>
    	<script>
    		jQuery( document ).ready(function() {
    			var click_triggered = false;
    			jQuery(document).on('gform_post_render', function(e, form_id) {
    				if ( jQuery('div.gform_validation_errors').length > 0 ) {
    					if (!click_triggered) {
    						jQuery(".wpcs_tab").trigger("click");
    						click_triggered = true;
    					}
    					console.log(click_triggered);
    				}
    			});
    		});
    	</script>
    	<?php
    }
    

    Thanks

    • This reply was modified 2 years, 9 months ago by Mirza Hamza.
    • This reply was modified 2 years, 9 months ago by Mirza Hamza.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gravity forms- slider closes on submission but form not completed’ is closed to new replies.