You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated the form filed values using JQuery , I can see the values changed in the DOM. But when I'm trying to access the form values using LForms.Util.getFormData the changed values are not getting.
For example, the initial value of my phone number is 'XXX-XXXXX' and changed to 'YYYY-YYYY' using JQuery.But When I trying to get the form values using LForms.Util.getFormData the value of phone number is still 'XXX-XXXXX' .
How can I get the values without rendering the Lform?
The text was updated successfully, but these errors were encountered:
The form you see is just view of LForms' internal data model, which is what getFormData() uses. If you need to change a field with jQuery (or other JavaScript) you will need to fire events so that the event listeners for the data model know something changed. Perhaps firing a change event on the field would be enough, though you might need to fire key events (probably just the last key).
The form you see is just view of LForms' internal data model, which is what getFormData() uses. If you need to change a field with jQuery (or other JavaScript) you will need to fire events so that the event listeners for the data model know something changed. Perhaps firing a change event on the field would be enough, though you might need to fire key events (probably just the last key).
Thank you @plynchnlm It's working fine when I fire a change event.
I have updated the form filed values using JQuery , I can see the values changed in the DOM. But when I'm trying to access the form values using
LForms.Util.getFormData
the changed values are not getting.For example, the initial value of my phone number is 'XXX-XXXXX' and changed to 'YYYY-YYYY' using JQuery.But When I trying to get the form values using
LForms.Util.getFormData
the value of phone number is still 'XXX-XXXXX' .How can I get the values without rendering the Lform?
The text was updated successfully, but these errors were encountered: