I create Reports by a Toolset Form, so there I've to create the relationships selecting Supplements, Conditions, Product.
I'm going to have almost 10.000 entries for products and 1000 Supplements and Conditions.
Is it a problem to load all that entries in the Form selects? Is it going to be very slow?
Has they are connected by relationships, when I select a Supplement, I could reduce the number of the products in the Products select. I know I can do it by a custom select with views, but I should create a multy step flow where I reload the page to filter products. Is there a way to do it dinamically with AJAX?
I've performed some tests on my own website and can confirm that the built-in relationships fields can only be used to show all the available post lists.
( same as on your test form at hidden link )
In order to achieve what you're planning, you can replace the relationship fields for the products and conditions with regular generic fields of type "select", making sure that the field names, remain the same.
( i.e. @condition-report.parent & @product-report.parent )
Next, you can attach a custom script that triggers when the value of the supplement field is selected/changed, and based on the selected value, populate only the relevant products and conditions, in their respective field, through AJAX.
I hope this helps and please let me know if you need any further assistance around this.
Hi, I'm trying to setup a Select2 Ajax (remote data). I've preapred a view that to output the correct json format, this is an example of the output of the view:
2. The actual steps to create a blank page template for a WordPress page will vary, based on the active theme, but you'll find the basic steps and concept in these guides:
hidden link hidden link
3. Your current approach of using a static page's URL ( e.g. hidden link ) for the AJAX call is not considered safe and is against WordPress development standards.
As we discussed in the chat, you should be using WordPress built-in file ( hidden link ), for processing such AJAX requests, as explained with example code snippets in this guide: hidden link
This way, you won't have to create a separate static page or page template for this.
Note: For more personalized assistance around general WordPress features and functions, you can post your questions at the specialized forums like: