Home › Forums › Quform WordPress › Pass field value to html field
- This topic has 5 replies, 2 voices, and was last updated 1 week, 2 days ago by oivanr.
- February 14, 2023 at 5:33 am #35168
I have a form, inside the form a text field: $(‘.quform-field-7_3’). Also I have a radio button field: $(‘.quform-field-7_25’) and a html field: $(‘.quform-field-7_26’).
Inside the html field I have a button : <button class=”btn-default” type=”button” id=”informeGrado”>Crear informe</button> also I had created a <p>Grado a buscar: <span id=”grado”></span></p>, following a tutorial you had at the forums.
The radiobutton ask if the user wants to create a report. When the user say ‘yes’, through a logical condition the html field is visible.
When the hmtl field is visible the user can click on the “InformeGrado” button, if the user does it, I call function in a js library who call an ajax:
accion = ‘informeGrado_Ajax’;
tabla = ‘wp_vw_04_19’;
buscar = $(‘#grado¡’).text(); <- this show the value at the html field, but I can’t use it to make an ajax call
console.log(buscar); <- buscar don´t have any value
If the text field $(‘.quform-field-7_3’) is empty the report prints all the records of a mysql table, that is fine.
What I want is to get the value of the text field $(‘.quform-field-7_3’) and send through ajax to print only the row that match this value.
I already had done this, but it didn`t work.
var grado = $(‘.quform-field-7_3’).val(grado);
The problem is that I don’t know how to get the value of $(‘.quform-field-7_3’) and use it to send through ajax. Remember that the ajax call is inside a html field and a function of js
Can you help me please?February 14, 2023 at 8:19 am #35171AllySupport Staff
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.February 15, 2023 at 4:41 am #35173
It works fine.
Thanks.March 10, 2023 at 6:28 am #35221
How I can do to acces to HTML field which is located in a second page of my form.
For example I have a form who has page 1 and page 2. In the page 2 I have an html with a
In my first page I have a dropdown (13_21) I have done this:
It doesn’t work.
Thanks in advance for your help.March 10, 2023 at 9:20 am #35222AllySupport Staff
You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.March 10, 2023 at 3:18 pm #35223
I check the other html fields and it is correct. There is another field with the same name. I already change the name and it works properly.
Thanks a lot.
- You must be logged in to reply to this topic.