Home › Forums › Quform WordPress › Field Variables: radio input
This topic is: resolved
- This topic has 2 replies, 2 voices, and was last updated 3 years, 12 months ago by Ally.
Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
- April 29, 2020 at 2:57 pm #31052DUALWERKParticipant
Hello,
I am refering to this post which is marked as resolved: https://support.themecatcher.net/forums/topic/field-variables
I tried to apply this for the radio input element with images. But it does not work.
Here is my code:
JS:
jQuery(document).ready(function ($) { $('.quform-field-2_50').bind('keyup blur', function () { var rVal = $(".quform-field-2_50:checked").val(); if(rVal){ $('#terminart').text(rVal); } console.log(rVal); }); });
HTML:
<span id="terminart"></span>
Seems like the bind event does not trigger because I don’t even get the console log. Does it work differently for radio inputs?
Thanks in advance!
- This topic was modified 3 years, 12 months ago by DUALWERK.
April 29, 2020 at 3:22 pm #31054DUALWERKParticipantI found a solution:
$('.quform-field-2_28').change(function() { $('#mitarbeiter').text($(this).filter(':checked').val()); });
This does only work if there is no pre-selected option. To solve this you could do something likes this:
var rVal = $('.quform-field-2_28').filter(':checked').val(); $('.quform-field-2_28').change(function() { rVal = $(this).filter(':checked').val(); $('#mitarbeiter').text(rVal); });
April 30, 2020 at 10:01 am #31059AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.