Populate another form field script

Home Forums Quform WordPress Populate another form field script

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

    Hi,
    I am using the script below to populate the shipping address if its the same as the billing address. My problem is this, I am using the “inside label placement” for my fields and when the shipping address is populated it still shows the inside label text as well. How would I edit the script to clear the inside label text on population?

    Cheers


    <script>
    jQuery(document).ready(function ($) {
    $('.iphorm_13_23').click(function () {
    if ($(this).is(':checked')) {
    $('.iphorm_13_26').val($('.iphorm_13_4').val());
    $('.iphorm_13_27').val($('.iphorm_13_5').val());
    $('.iphorm_13_28').val($('.iphorm_13_19').val());
    $('.iphorm_13_22').val($('.iphorm_13_13').val());
    $('.iphorm_13_29').val($('.iphorm_13_14').val());
    $('.iphorm_13_30').val($('.iphorm_13_49').val());
    $('.iphorm_13_31').val($('.iphorm_13_25').val());
    $('.iphorm_13_32').val($('.iphorm_13_18').val());
    $('.iphorm_13_33').val($('.iphorm_13_24').val());
    $('.iphorm_13_34').val($('.iphorm_13_8').val());
    $('.iphorm_13_35').val($('.iphorm_13_6').val());
    $('.iphorm_13_36').val($('.iphorm_13_7').val());
    } else {
    $('.iphorm_13_26, .iphorm_13_27, .iphorm_13_28, .iphorm_13_22, .iphorm_13_29, .iphorm_13_30, .iphorm_13_31, .iphorm_13_32, .iphorm_13_33, .iphorm_13_34, .iphorm_13_35, .iphorm_13_36').val('');
    }
    });
    });
    </script>

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

    #14773
    DCM
    Participant

    Worked perfect! – Five stars
    Thank you

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