• Resolved Stef

    (@serafinnyc)


    Messes with drop down toggle menus in mobile devices. Other devs added snippet to searchform.php in Avada theme and then added that to Child theme. Menu on mobile device stops working on that theme and a few others I tested.

    The code they used was as follows

     
    <form role="search" class="searchform" method="get" action="<?php echo esc_url_raw( home_url( '/' ) ); ?>">
    	<div class="search-table">
    		<div class="search-field">
    			<input type="date" value="Y-mm-dd" name="s" class="s" placeholder="<?php esc_html_e( 'YYYY-MM-DD', 'Avada' ); ?>" required aria-required="true" aria-label="<?php esc_html_e( 'YYYY-MM-DD', 'Avada' ); ?>"/>
    		</div>
    		<div class="search-button">
    			<input type="submit" class="searchsubmit" style="font-size:16px"><i value="" />
    		</div>
    	</div>
    </form>
    
    

    This unfortunately breaks everything. Need to hook it in from functions

    • This topic was modified 3 years, 9 months ago by Stef.
    • This topic was modified 3 years, 9 months ago by Stef.
Viewing 4 replies - 1 through 4 (of 4 total)
  • @serafinnyc Please share a link to page where you are facing this issue or provide screenshot of console, is there any error on console related to this plugin?

    thank

    @serafinnyc Please also share screenshot of searchform.php how you are using the provided code snippet in searchform.php.

    In your code snippet I have noticed that you are using input type date, this is not valid type for datepicker. If you want to use date field from WP Datepicker plugin you should use input type text and use id or class of that filed in WP Datepicker settings page.

    Thanks

    Thread Starter Stef

    (@serafinnyc)

    That is the searchform.php up top @joelparker

    Other devs added snippet to searchform.php in Avada theme

    I already fixed it on my own. Wanted to point out a problem for junior devs so that they don’t make this mistake.

    P.S. doesn’t matter if it’s not the standard. The prev devs set it that way and in troubleshooting changing the input to anything didn’t work either. Just FYI.

    • This reply was modified 3 years, 9 months ago by Stef.
    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @serafinnyc thank you so much for creating this thread so new developers can understand this conflict. Actually modern browsers are overriding the datepicker functionality by sniffing all input type date fields.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Throws Error When Embedding Code’ is closed to new replies.