I am trying to:
Have my materials drop down in the first 'field' of my form.
Link to a page where the issue can be seen:
hidden link
I expected to see:
list of materials
Instead, I got: no results found
I submitted this before and am now coming back to it but couldn't reply in the other forum. I got in touch with WP rocket but they couldn't see any issues on their end.
Hi,
Thank you for contacting us and I'd be happy to assist.
To troubleshoot this, I'll need to see how this form and its fields are set up in the admin area.
Can you please share temporary admin login details, in reply to this message?
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
regards,
Waqar
Thank you for sharing the access details.
During troubleshooting, I noticed that the WordPress AJAX requests are getting blocked on your website. Toolset and other plugins and themes use this standard WordPress feature to load data in the background, without having to reload the page.
Most likely the two security plugins active on your website are responsible for this. I'll recommend testing the form, with the security plugins disabled. Once the issue is narrowed down, you can consult that respective security plugin's documentation and support team to safely allow WordPress AJAX requests.
I hope this helps and please let me know if you need further assistance.
Thanks. I tried deactivating both of the security plugins, but it did not fix the issue.
I've created a test form 'Test form to add activity', which can be viewed on the page, named 'Test form to add activity'.
The difference between this form and the one that you've set is that I switched to the 'Expert mode' and added the use_select2='never' attribute to the shortcode for the relationship field.
( screenshot: hidden link )
Ref: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_field
You can see that the material selection field is working in this new form. The reason is that when the 'select2' script feature is disabled, the options are loaded all at once and don't rely on the AJAX call.
As a temporary fix, you can use the same workaround on your actual form too. But for the long-term and proper solution, I'll recommend getting in touch with your hosting support team to investigate and resolve why the AJAX calls are getting blocked.
Thank you so much for your help with this. The issue is resolved for now and I will get in touch with hosting support to resolve the AJAX issue.