HTML logic condition

Home Forums Quform WordPress HTML logic condition

This topic is: resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13113
    htedros
    Participant

    I want to show new text field when user press enter or other key into previous text field,
    I use your code,

    <script>
    jQuery(document).ready(function ($) {
    $('.iphorm_1_137').bind('keyup blur', function () {
    if ($(this).val() != '') {
    $('.iphorm_1_139').show();
    } else {
    $('.iphorm_1_139').hide();
    }
    }).blur();
    });
    </script>

    But new text field show when user type anything, I want to show just when specified key pressed
    I tried this code, but still dont work:

    <script>
    jQuery(document).ready(function ($) {
    $('.iphorm_1_137').bind(function () {
    var key = e.which;
    if(key == 13) //13 is enter key
    {
    $('.iphorm_1_139').show();
    } else {
    $('.iphorm_1_139').hide();
    }
    }).blur();
    });
    </script>

    #13133
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #13151
    htedros
    Participant

    It works,

    thanks

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy