Using text input to change drop down values

Home Forums Quform WordPress Using text input to change drop down values

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

    Hi Ally,
    I am wanting to try and use a text input to create some conditional logic.
    What I would like is for the user to type a number into a text field and then that value dynamically changes a value in a drop down list (these drop down values can be used for conditional logic)

    I tried the following code in an html element after reading a whole bunch of other posts and trying to put all the logic together but I am definitely no coder and surprise, surprise it doesn’t work.
    ` <script>
    jQuery(document).ready(function ($) {
    $(“.iphorm_1_4”).on(‘keyup’,function(){
    $numberSelect = $(‘.iphorm_1_5’)
    if ($(this).val() >= 10000000) {
    $numberSelect.val(‘More than 10 million’).change();
    }
    else if ($(this).val() > 1) {
    $numberSelect.val(‘More than 1’).change();
    }
    else if ($(this).val() = 1)) {
    $numberSelect.val(‘1’).change();
    }
    else if ($(this).val() < 1)) {
    $numberSelect.val(‘Less than 1’).change();
    }
    else {
    $numberSelect.val(‘Unknown’).change();
    }
    });
    });
    </script> `
    Any help would be greatly appreciated

    #18274
    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.

    • This reply was modified 8 years, 2 months ago by Ally.
    • This reply was modified 8 years, 2 months ago by Ally.
    #18278
    Leodore
    Participant

    Thank you so Much Ally! It works perfectly. The customer support in this Forum is incredible! I am blown away by how awesome you are 🙂

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