Thank you for sharing the admin access.
Earlier, when I checked the form, all users with the "Lender" role were showing, but now only two of them are there.
You can revert back any changes you've made so that all the "Lender" users are showing in the form and then follow these steps:
1. As the value for these checkboxes is using the 'usernames', you can include the hidden usernames of all the post authors whose results are showing, in the bottom of view's loop item template:
<div class="lenders-container" style="display:none;">[wpv-post-author format="meta" meta="user_login"]</div>
Note: These usernames will be hidden, but we'll be able to read them through a custom script.
2. In the CSS editor of the view, you'll include some code so that all lender user options are hidden, when the form initially loads:
#form_applyforterms #frm_field_10_container .frm_checkbox {
display: none;
}
3. In the view's JS editor, you can include the following custom script, which executes, whenever the popup with ID "2178" is loaded/shown. The script will read all the hidden usernames of lenders whose posts are available in the view's results and then make only their respective checkbox option visible in the form:
jQuery( document ).on( 'elementor/popup/show', ( event, id, instance ) => {
if ( id === 2178 ) {
var names = [];
jQuery( ".lenders-container" ).each(function( index ) {
var txt = jQuery( this ).text();
names[index] = txt;
});
jQuery.each(names , function(index, val) {
jQuery( "#frm_field_10_container input[value='"+val+"']" ).closest( ".frm_checkbox" ).css( "display", "block" );
});
}
});
I hope this helps and for more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/