Home › Forums › Quform WordPress › Çhange dinamically label of text field
- This topic has 3 replies, 2 voices, and was last updated 2 years, 1 month ago by Ally.
- AuthorPosts
- October 24, 2022 at 8:06 pm #34863oivanrParticipant
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 })October 25, 2022 at 10:15 am #34871AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 25, 2022 at 6:11 pm #34873oivanrParticipantHi,
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.October 26, 2022 at 8:47 am #34874AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.