Home › Forums › Quform WordPress › Showing fields based on field values
- This topic has 5 replies, 3 voices, and was last updated 4 years, 11 months ago by qutel.
- AuthorPosts
- April 9, 2019 at 5:28 pm #28981qutelParticipant
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.
April 10, 2019 at 11:38 am #28997AllySupport StaffYou 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.
April 10, 2019 at 3:21 pm #29002artsolvingParticipanthi 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
April 10, 2019 at 6:43 pm #29007AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 11, 2019 at 9:10 am #29024artsolvingParticipantfine,
warmsApril 11, 2019 at 7:20 pm #29035qutelParticipantFixed!
Thanks!
- AuthorPosts
- You must be logged in to reply to this topic.