Hi @madoxx
You need this this plugin anyway as it is necessary for the integration between Forminator and wpDataTables. But it’s only a “connector” and it doesn’t help or make it “easier” to set it up.
However, after reading your initial request again I think custom code won’t be necessary here after all.
The process would be nearly the same as the one my colleague suggested earlier with just one exception – calculations.
Let me then describe it in more detailed steps below.
1. Create a table with your questions. You need to add as many “radio” fields to the form as questions you want to have there.
– in each “radio” field enable “calculations” option
– and there assign a value to each option
2. Now you need to add as many “calculation” type fields to the form as you have “areas”. Let’s say you have 10 areas – so you need 10 calculation fields on form.
3 give those calculation fields some labels like e.g. “Area 1 score”, “Area 2 score” and so on
4. now for each calculation field do this:
– switch to “Calculations” tab of the field and using + operator and blue icon for selecting fields simply set a sum of radio fields for Area 1 there;
– you basically need to click on a blue field selection icon, select one of the radio fields, click on + to add + operator, then click again on blue field selection icon, add next radio field and so on – until you have all the radio fields of the Area 1 added.
5. once you have all these calculations set, save the form and when you try to fill-in the form you’ll see that each calculation field shows calculated score, depending on the choices of radio in a given area.
I hope that makes sense so far.
Now the next step is the chart so you need both wpDataTables and that additional Forminator integration plugins active on site.
You also need to put the form on some page and submit it at least once (so there’d be submission data saved; otherwise you won’t be able to create wpDataTable for that form).
6. Then you go to “wpDataTables -> WPDataTables” page and click on “Add new”
– select “Create a data tabl elinked to an existing data source” option
– then select “Forminator Form” in “Input data source type” and select your form from “Choose a Forminator Form” drop-down that shows up
– and below that you’ll see “Choose feeds to show as columns” – use it to select your calculation fields (so your “Area 1 Score”, “Area 2 Score” and so on); you don’t need to choose any other form fields there
– and finally save changes.
At this point you have integration set between Forminator Form and wpDataTables so wpDataTables have access to and can process form data.
Next step is to create chart
7. Go to “wpDataTables -> wpDataCharts” and click “Add new”
8. Now you’ll need to select charts engine and that’s a bit tricky because:
– you mentioned “Polar area” charts
– and if you select “Google Charts” – there is no such char there
– if you select “Charts.js” – there is such chart there but it only takes two sources – and with your plan you’ll have 10 sources
This is, however, related to how these charts work and I’m not able to give you solution to that. I’m not sure if this is due to those charts scripts or a limitation of a free version of wpDataTables (you can ask wpDataTables support if there’s a way to add more than 2 columns as data source for Polar Area chart; maybe they know).
But in general, after you select chart engine and then chart type you’ll be asked to select “wpDataTable Data Source” so you select the table that you created in step 6.
And once that is selected, you’ll have all available columns (your “Area 1 Score”, “Area 2 Score” and so on) on the left so you need to add them to the list on the right.
Then you just save it and you have it all set.
Once you add chart shortcode somewhere on the page, you’ll have it show the chart with cumulative data (based on all submissions of the form; on calculated score).
—-
Note:
– this would work (I just tested it) and doesn’t require any custom coding
– but it will show a cumulative chart based on all form submissions
– if you need it to show chart for a specific single submissions only (e.g. submitting user data) – it’s not doable with a free version of the wpDataTables plugin; it’s their limitation and not ours – because you need to create a filter for the table that will only show specific submission data dynamically.
Best regards,
Adam