Site logo

[Resolved] How to hide smartphone keyboard in specific fields

Home Forums Support [Resolved] How to hide smartphone keyboard in specific fields

Home Forums Support How to hide smartphone keyboard in specific fields

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1878792
    Luiz Guilherme

    For example, in date fields, where wordpress displays fields to choose the date, the keyboard could be auto hidden.

    #1878807
    Leo
    Staff
    Customer Support

    Hi there,

    This isn’t something the theme can control.

    I’m not sure if this is something WordPress can control either.

    Might just be a browser aspect of things.

    #1879725
    Luiz Guilherme

    I solve with this function:

    Obs.:
    196 is the number of the page!
    g196-chegada and g196-sada are the ID of que data fields
    You need to change this 3 information on your code.

    /* JETPACK - DATE field of forms: Disabling Mobile Keyboard */
    function js_on_specific_pages_f() {
    	if (is_page ('196')) { echo'
    	<script>
    	  document.getElementById("g196-chegada").readOnly=true;
    	  document.getElementById("g196-sada").readOnly=true;
        </script>
    	'; }
    }
    add_action('wp_footer', 'js_on_specific_pages_f');
    #1879729
    Leo
    Staff
    Customer Support

    Glad to hear 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.