Çhange dinamically label of text field

Home Forums Quform WordPress Çhange dinamically label of text field

This topic is: not resolved
  • This topic has 3 replies, 2 voices, and was last updated 1 month ago by Ally.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34863
    oivanr
    Participant

    Hi,
    I have a form with a button radio field (6_18), when I change the value of an option(line 1) I want to change the label of a text field (line 2). The rest of code works fine (lines 3 to 7).
    What I can do to acomplish this change?
    Thanks,

    1     $(‘.quform-field-6_18’).change(function () {
    2         //$(‘.quform-field-6_113’).label(‘new label’);
    3         codCuenta  = $(‘.quform-field-6_7’).val();
    4         noOpcion   = $(‘.quform-field-6_98’).val();
    5         tipo       = $(‘.quform-field-6_18’).val();
    6         consultaFlds(‘wp_cb_006m’,codCuenta,’cb_006m_codCuenta’,noOpcion,’cb_006m_noOpcionP’)
    7     })

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

    #34873
    oivanr
    Participant

    Hi,
    Thanks for your response. I have an issue with this. The other day you resolve a questions about the change in radio button field. The same thing here:
    1     $(‘.quform-field-6_18’).change(function () {
    2         tipo       = $(‘.quform-field-6_18’).val();
    3         if (tipo === ‘N’){
    4             $(‘.quform-element-6_113 .quform-label-text’).text(‘nombre’);
    5         }
    6         codCuenta  = $(‘.quform-field-6_7’).val();
    7         noOpcion   = $(‘.quform-field-6_98’).val();
    8         tipo       = $(‘.quform-field-6_18’).val();
    9         console.log(tipo);
    10         consultaFlds(‘wp_cb_006m’,codCuenta,’cb_006m_codCuenta’,noOpcion,’cb_006m_noOpcionP’)
    11     })

    a) 6_18 field is a radio button one. With this change function the logical conditions work fine.
    b) the label text depend on the value of this field, but doesn’t triger the label change.
    c) For example: the 6_19 have values of ‘C’ and ‘N’, when the value change to ‘N’ the label has to change but when I check the console.log the value always remain on ‘C’
    What can I do?
    Thanks in advance for your help.

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2022 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy