Version Description
- Fixed: Statistics for multiple choice logic.
Download this release
Release Info
Developer | webdorado |
Plugin | Form Maker by WD – user-friendly drag & drop Form Builder plugin |
Version | 1.13.28 |
Comparing to | |
See all releases |
Code changes from version 1.13.27 to 1.13.28
- admin/controllers/Submissions_fm.php +1 -1
- admin/models/Submissions_fm.php +30 -8
- form-maker.php +3 -3
- readme.txt +4 -1
admin/controllers/Submissions_fm.php
CHANGED
@@ -314,7 +314,7 @@ class FMControllerSubmissions_fm extends FMAdminController {
|
|
314 |
$colors = array();
|
315 |
$choices_colors = array();
|
316 |
if ( count($sorted_labels_id) != 0 ) {
|
317 |
-
$choices_params = $this->model->statistic_for_radio($where_choices, $sorted_labels_id[$key]);
|
318 |
$sorted_label_name_original = $sorted_label_names_original[$key];
|
319 |
$choices_count = $choices_params[0];
|
320 |
$choices_labels = $choices_params[1];
|
314 |
$colors = array();
|
315 |
$choices_colors = array();
|
316 |
if ( count($sorted_labels_id) != 0 ) {
|
317 |
+
$choices_params = $this->model->statistic_for_radio($where_choices, $sorted_labels_id[$key], $labels_parameters[1][$key]);
|
318 |
$sorted_label_name_original = $sorted_label_names_original[$key];
|
319 |
$choices_count = $choices_params[0];
|
320 |
$choices_labels = $choices_params[1];
|
admin/models/Submissions_fm.php
CHANGED
@@ -477,7 +477,7 @@ class FMModelSubmissions_fm extends FMAdminModel {
|
|
477 |
* @param string $sorted_label_id
|
478 |
* @return array
|
479 |
*/
|
480 |
-
public function statistic_for_radio( $where_choices = '', $sorted_label_id = '' ) {
|
481 |
global $wpdb;
|
482 |
$choices_params = array();
|
483 |
$query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits WHERE " . $where_choices . " AND element_label='" . $sorted_label_id . "'";
|
@@ -487,17 +487,39 @@ class FMModelSubmissions_fm extends FMAdminModel {
|
|
487 |
$choices_labels = array();
|
488 |
$choices_count = array();
|
489 |
$all = count($choices);
|
|
|
490 |
$unanswered = 0;
|
491 |
-
|
492 |
-
|
493 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
}
|
495 |
-
|
496 |
-
if ( !in_array($choice
|
497 |
-
array_push($choices_labels, $choice
|
498 |
array_push($choices_count, 0);
|
499 |
}
|
500 |
-
$choices_count[array_search($choice
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
501 |
}
|
502 |
}
|
503 |
array_multisort($choices_count, SORT_DESC, $choices_labels);
|
477 |
* @param string $sorted_label_id
|
478 |
* @return array
|
479 |
*/
|
480 |
+
public function statistic_for_radio( $where_choices = '', $sorted_label_id = '', $field = '' ) {
|
481 |
global $wpdb;
|
482 |
$choices_params = array();
|
483 |
$query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits WHERE " . $where_choices . " AND element_label='" . $sorted_label_id . "'";
|
487 |
$choices_labels = array();
|
488 |
$choices_count = array();
|
489 |
$all = count($choices);
|
490 |
+
$choices_checkbox = array();
|
491 |
$unanswered = 0;
|
492 |
+
if( $field == "type_checkbox" ) {
|
493 |
+
foreach ( $choices as $key => $choice ) {
|
494 |
+
if ( $choice->element_value == '' ) {
|
495 |
+
$unanswered++;
|
496 |
+
} else {
|
497 |
+
$values=explode('***br***',$choice->element_value);
|
498 |
+
unset($values[count($values)-1]);
|
499 |
+
$choices_checkbox = array_merge( $choices_checkbox, $values );
|
500 |
+
}
|
501 |
}
|
502 |
+
foreach ( $choices_checkbox as $key => $choice ) {
|
503 |
+
if ( !in_array($choice, $choices_labels) ) {
|
504 |
+
array_push($choices_labels, $choice);
|
505 |
array_push($choices_count, 0);
|
506 |
}
|
507 |
+
$choices_count[array_search($choice, $choices_labels)]++;
|
508 |
+
}
|
509 |
+
$all = count($choices_checkbox) + $unanswered;
|
510 |
+
}
|
511 |
+
else {
|
512 |
+
foreach ( $choices as $key => $choice ) {
|
513 |
+
if ( $choice->element_value == '' ) {
|
514 |
+
$unanswered++;
|
515 |
+
}
|
516 |
+
else {
|
517 |
+
if ( !in_array($choice->element_value, $choices_labels) ) {
|
518 |
+
array_push($choices_labels, $choice->element_value);
|
519 |
+
array_push($choices_count, 0);
|
520 |
+
}
|
521 |
+
$choices_count[array_search($choice->element_value, $choices_labels)]++;
|
522 |
+
}
|
523 |
}
|
524 |
}
|
525 |
array_multisort($choices_count, SORT_DESC, $choices_labels);
|
form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
-
* Version: 1.13.
|
7 |
* Author: 10Web Form Builder Team
|
8 |
* Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -98,8 +98,8 @@ final class WDFM {
|
|
98 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
99 |
$this->front_urls = $this->get_front_urls();
|
100 |
$this->main_file = plugin_basename(__FILE__);
|
101 |
-
$this->plugin_version = '1.13.
|
102 |
-
$this->db_version = '2.13.
|
103 |
$this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
|
104 |
$this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
|
105 |
$this->menu_slug = 'manage' . $this->menu_postfix;
|
3 |
* Plugin Name: Form Maker
|
4 |
* Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
|
5 |
* Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
|
6 |
+
* Version: 1.13.28
|
7 |
* Author: 10Web Form Builder Team
|
8 |
* Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
98 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
99 |
$this->front_urls = $this->get_front_urls();
|
100 |
$this->main_file = plugin_basename(__FILE__);
|
101 |
+
$this->plugin_version = '1.13.28';
|
102 |
+
$this->db_version = '2.13.28';
|
103 |
$this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
|
104 |
$this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
|
105 |
$this->menu_slug = 'manage' . $this->menu_postfix;
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
|
|
3 |
Tags: form, forms, form builder, contact form, feedback, custom form, contact, web contact form, captcha, email, form manager, survey
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.3
|
6 |
-
Stable tag: 1.13.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -562,6 +562,9 @@ Where **{{field_id}}** is the ID of the field you wish to prefill. Also, **{{par
|
|
562 |
|
563 |
== Changelog ==
|
564 |
|
|
|
|
|
|
|
565 |
= 1.13.27 =
|
566 |
* Added: Option to disable shake effect on error.
|
567 |
* Fixed: Multiple choice fields styles on IE11.
|
3 |
Tags: form, forms, form builder, contact form, feedback, custom form, contact, web contact form, captcha, email, form manager, survey
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 1.13.28
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
562 |
|
563 |
== Changelog ==
|
564 |
|
565 |
+
= 1.13.28 =
|
566 |
+
* Fixed: Statistics for multiple choice logic.
|
567 |
+
|
568 |
= 1.13.27 =
|
569 |
* Added: Option to disable shake effect on error.
|
570 |
* Fixed: Multiple choice fields styles on IE11.
|