Showing fields based on field values

Home Forums Quform WordPress Showing fields based on field values

This topic is: resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28981
    qutel
    Participant

    Hello,

    We want to show or hide some fields depending on the user’s age, in particular show extra fields when the user is under age. For this we ask for the date of birth (it is a field that we need), and depending on this field we calculate the age of the user and assign it to another hidden field. This we have done.

    The problem is that we are not able to show specific fields for minors based on the value of this hidden field. We have to click outside the form to force that those fields are shown, it is not shown automatically.

    Should we add something to that hidden field to trigger the display of specific fields for minors?

    thanks.

    #28997
    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 4 years, 11 months ago by Ally.
    #29002
    artsolving
    Participant

    hi ally,
    i have an input field with numeric value in order to calculate a result. I want to show a preset value if the input field receive a number less than 50. here the code but doesn’t work. any suggest ?

    var val8 = $(‘.quform-field-9_4’).val();
    if (val8 && val8.length && $.isNumeric(val8))
    var val9 = $(‘.quform-field-9_5’).val();
    if (val9 && val9.length && $.isNumeric(val9)) {
    totaldeskcasslite += parseFloat(val8) * parseFloat(val9) * 0.012;
    totaldeskcassmed += parseFloat(val8) * parseFloat(val9) * 0.015;
    totaldeskcasshigh += parseFloat(val8) * parseFloat(val9) * 0.020;

    }

    else if (val9 && val9.length && $.isNumeric(val9) < 50) {
    totaldeskcasslite += 50;
    totaldeskcassmed += 70;
    totaldeskcasshigh += 100;

    }

    thanks

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

    #29024
    artsolving
    Participant

    fine,
    warms

    #29035
    qutel
    Participant

    Fixed!

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 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