show / hide group of fields from js

Home Forums Quform WordPress show / hide group of fields from js

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

    Hi,
    I am trying to show/hide dinamically a fieldset (group). I am using the follow script

    1     $(‘.quform-field-6_28’).change(function () {
    2         valorOpcion = $(‘.quform-field-6_28’).val();
    3         if (valorOpcion === ‘0’){
    4             $(‘.quform-field-6_18’).filter(‘[value=M]’).prop(‘checked’,true);
    5             $(‘.quform-field-6_37’).show();
    6             $(‘.quform-element-6_37 .quform-element-row’).each(function (index, row) {
    7                 var contador = 9;
    8                 console.log(contador);
    9                 var $row = $(row);
    10                 if (index < 9) {
    11                     $row.show();
    12                 }
    13             })
    14         }
    15     })

    Line 2, take the val of a field a put into a variable
    Line 3, compare the value and if it is string 0, check a button radio group
    Line 4, check the option in the button radio
    Line 5, doesn’t work
    Tehe rest is fine.
    Everything is fine except for the line 5. it doesn’t show the group of fields.
    Thanks in advance for your help.

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

    #34791
    oivanr
    Participant

    Hi,
    It works great!!
    Indeed you have a great plugin, I had been for several years now and is absolutely fantastic.
    Check this issue as resolved, please.
    Thanks a lot

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