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 am appending data to the ajax form when constructing the options object, The data I am appending is an array or object, which is linked to a key in the data object,
Expected Behavior:
The appended array or object used with the "data" property in the form options gets sent through to the backend.
Actual behavior:
This only works in some cases. If I append a string, the values go through fine, The issue seems to only occur with arrays and objects.
For example:
var formOptions = { beforeSubmit: validateRequest, // pre-submit callback success: showResponse, // post-submit callback error: showError, dataType: "json", data: {chosenPos : selectedPos, chosenNotifs : selectedNotifs}, resetForm: false, }
selectedPos and selectedNotifs are arrays or objects with global scope. This has worked before, but for some reason now does not seem to. It is not consistent.
Thanks for the great library!
Versions:
jquery-form: 4.3.0 jQuery: 3.5.1
The text was updated successfully, but these errors were encountered:
Description:
Hi
I am appending data to the ajax form when constructing the options object, The data I am appending is an array or object, which is linked to a key in the data object,
Expected Behavior:
The appended array or object used with the "data" property in the form options gets sent through to the backend.
Actual behavior:
This only works in some cases. If I append a string, the values go through fine, The issue seems to only occur with arrays and objects.
For example:
var formOptions = { beforeSubmit: validateRequest, // pre-submit callback success: showResponse, // post-submit callback error: showError, dataType: "json", data: {chosenPos : selectedPos, chosenNotifs : selectedNotifs}, resetForm: false, }
selectedPos and selectedNotifs are arrays or objects with global scope. This has worked before, but for some reason now does not seem to. It is not consistent.
Thanks for the great library!
Versions:
jquery-form: 4.3.0
jQuery: 3.5.1
The text was updated successfully, but these errors were encountered: