Add field ID to AJAX data in admin forms JS

This update modifies the AJAX request in `forms.js` by including the field ID in the data payload. This improvement enables more precise handling of form fields in the Ultimate Member plugin's admin interface.
This commit is contained in:
Mykyta Synelnikov
2025-09-17 15:02:40 +03:00
parent bdf96012c8
commit 1a3a6aec53
3 changed files with 27 additions and 4 deletions
+2
View File
@@ -105,10 +105,12 @@ function um_admin_init_pages_select() {
dataType: 'json',
delay: 250, // delay in ms while typing when to perform a AJAX search
data: function( params ) {
let fieldID = jQuery(this).attr('id');
return {
search: params.term, // search query
action: 'um_get_pages_list', // AJAX action for admin-ajax.php
page: params.page || 1, // infinite scroll pagination
field_id: fieldID, // select ID
nonce: um_admin_scripts.nonce
};
},