Home › Forums › Quform WordPress › HTML logic condition
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>
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
It works,
thanks