Version Description
- fixed "source and screen fields in csv file".
- fixed "multiple empty tables issue on same page".
Download this release
Release Info
Developer | CRMPerks |
Plugin | Contact Form Entries – Contact Form 7, WPforms and more |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.9 to 1.1.0
- contact-form-entries.php +5 -4
- includes/data.php +3 -2
- includes/plugin-pages.php +14 -6
- readme.txt +7 -3
- templates/leads.php +1 -1
- wp/crmperks-notices.php +1 -1
contact-form-entries.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Contact Form Entries
|
4 |
* Description: Save form submissions to the database from <a href="https://wordpress.org/plugins/contact-form-7/">Contact Form 7</a>, <a href="https://wordpress.org/plugins/jetpack/">JetPack Contact Form</a>, <a href="https://wordpress.org/plugins/ninja-forms/">Ninja Forms</a>, <a href="https://wordpress.org/plugins/formidable/">Formidable Forms</a>, <a href="http://codecanyon.net/item/quform-wordpress-form-builder/706149">Quform</a>, <a href="https://wordpress.org/plugins/cforms2/">cformsII</a>, <a href="https://wordpress.org/plugins/contact-form-plugin/">Contact Form by BestWebSoft</a>, <a href="https://wordpress.org/plugins/ultimate-form-builder-lite/">Ultimate Form Builder</a>, <a href="https://wordpress.org/plugins/caldera-forms/">Caldera Forms</a> and <a href="https://wordpress.org/plugins/wpforms-lite/">WP Forms</a>.
|
5 |
-
* Version: 1.0
|
6 |
* Requires at least: 3.8
|
7 |
-
* Tested up to: 5.
|
8 |
* Author URI: https://www.crmperks.com
|
9 |
* Plugin URI: https://www.crmperks.com/plugins/contact-form-plugins/crm-perks-forms/
|
10 |
* Author: CRM Perks
|
@@ -26,7 +26,7 @@ class vxcf_form {
|
|
26 |
public static $type = "vxcf_form";
|
27 |
public static $path = '';
|
28 |
|
29 |
-
public static $version = '1.0
|
30 |
public static $upload_folder = 'crm_perks_uploads';
|
31 |
public static $db_version='';
|
32 |
public static $base_url='';
|
@@ -178,6 +178,7 @@ self::$plugin->instance();
|
|
178 |
}
|
179 |
}
|
180 |
public function entries_shortcode($atts){
|
|
|
181 |
$form_id='';
|
182 |
if(!empty($atts['form-id'])){
|
183 |
$form_id=$atts['form-id'];
|
@@ -298,7 +299,7 @@ $field_label= date('M-d-Y H:i:s',$field_label);
|
|
298 |
|
299 |
} die('-----------');*/
|
300 |
ob_start();
|
301 |
-
|
302 |
return ob_get_clean();
|
303 |
}
|
304 |
|
2 |
/**
|
3 |
* Plugin Name: Contact Form Entries
|
4 |
* Description: Save form submissions to the database from <a href="https://wordpress.org/plugins/contact-form-7/">Contact Form 7</a>, <a href="https://wordpress.org/plugins/jetpack/">JetPack Contact Form</a>, <a href="https://wordpress.org/plugins/ninja-forms/">Ninja Forms</a>, <a href="https://wordpress.org/plugins/formidable/">Formidable Forms</a>, <a href="http://codecanyon.net/item/quform-wordpress-form-builder/706149">Quform</a>, <a href="https://wordpress.org/plugins/cforms2/">cformsII</a>, <a href="https://wordpress.org/plugins/contact-form-plugin/">Contact Form by BestWebSoft</a>, <a href="https://wordpress.org/plugins/ultimate-form-builder-lite/">Ultimate Form Builder</a>, <a href="https://wordpress.org/plugins/caldera-forms/">Caldera Forms</a> and <a href="https://wordpress.org/plugins/wpforms-lite/">WP Forms</a>.
|
5 |
+
* Version: 1.1.0
|
6 |
* Requires at least: 3.8
|
7 |
+
* Tested up to: 5.4
|
8 |
* Author URI: https://www.crmperks.com
|
9 |
* Plugin URI: https://www.crmperks.com/plugins/contact-form-plugins/crm-perks-forms/
|
10 |
* Author: CRM Perks
|
26 |
public static $type = "vxcf_form";
|
27 |
public static $path = '';
|
28 |
|
29 |
+
public static $version = '1.1.0';
|
30 |
public static $upload_folder = 'crm_perks_uploads';
|
31 |
public static $db_version='';
|
32 |
public static $base_url='';
|
178 |
}
|
179 |
}
|
180 |
public function entries_shortcode($atts){
|
181 |
+
|
182 |
$form_id='';
|
183 |
if(!empty($atts['form-id'])){
|
184 |
$form_id=$atts['form-id'];
|
299 |
|
300 |
} die('-----------');*/
|
301 |
ob_start();
|
302 |
+
include(self::$path . "templates/leads-table.php");
|
303 |
return ob_get_clean();
|
304 |
}
|
305 |
|
includes/data.php
CHANGED
@@ -341,13 +341,14 @@ if(!empty($search)){
|
|
341 |
}
|
342 |
$sql.=" group by l.id ";
|
343 |
$sql.=" order by $order_by $order ";
|
|
|
344 |
if($per_page!='all'){
|
345 |
$sql.=" LIMIT {$start},{$per_page}";
|
346 |
}
|
347 |
// $sql='SELECT l.* from wp_vxcf_leads l left join wp_vxcf_leads_detail d on (l.id = d.lead_id) left join tickets t on(l.id=t.entry_id) where l.form_id ="cf_6" and l.status ="0" and d.value like "%bioinfo35@gmail.com%" and d.name = "your-email" and t.status ="open" and t.priority="normal" group by d.lead_id order by l.id DESC LIMIT 0,20';
|
348 |
//echo $sql.'<hr>';
|
349 |
$results=$wpdb->get_results($sql, ARRAY_A);
|
350 |
-
|
351 |
// $re = $wpdb->get_results('SELECT FOUND_ROWS();', ARRAY_A);
|
352 |
//
|
353 |
$leads=array();
|
@@ -366,7 +367,7 @@ if(!empty(vxcf_form::$form_fields)){
|
|
366 |
$sql_d.=' FROM '.$detail.' where lead_id in('.implode(',',$ids).') GROUP BY `lead_id` ';
|
367 |
|
368 |
$res= $wpdb->get_results($sql_d, ARRAY_A);
|
369 |
-
|
370 |
if(!empty($res)){
|
371 |
foreach($res as $v){
|
372 |
if(!empty($v['lead_id']) && !empty($leads[$v['lead_id']])){
|
341 |
}
|
342 |
$sql.=" group by l.id ";
|
343 |
$sql.=" order by $order_by $order ";
|
344 |
+
//$per_page=20;
|
345 |
if($per_page!='all'){
|
346 |
$sql.=" LIMIT {$start},{$per_page}";
|
347 |
}
|
348 |
// $sql='SELECT l.* from wp_vxcf_leads l left join wp_vxcf_leads_detail d on (l.id = d.lead_id) left join tickets t on(l.id=t.entry_id) where l.form_id ="cf_6" and l.status ="0" and d.value like "%bioinfo35@gmail.com%" and d.name = "your-email" and t.status ="open" and t.priority="normal" group by d.lead_id order by l.id DESC LIMIT 0,20';
|
349 |
//echo $sql.'<hr>';
|
350 |
$results=$wpdb->get_results($sql, ARRAY_A);
|
351 |
+
//echo json_encode($results); die();
|
352 |
// $re = $wpdb->get_results('SELECT FOUND_ROWS();', ARRAY_A);
|
353 |
//
|
354 |
$leads=array();
|
367 |
$sql_d.=' FROM '.$detail.' where lead_id in('.implode(',',$ids).') GROUP BY `lead_id` ';
|
368 |
|
369 |
$res= $wpdb->get_results($sql_d, ARRAY_A);
|
370 |
+
//echo $sql_d.'-----<hr>'.json_encode($res).'<-------'.$wpdb->last_error.'----<hr>'; //die();
|
371 |
if(!empty($res)){
|
372 |
foreach($res as $v){
|
373 |
if(!empty($v['lead_id']) && !empty($leads[$v['lead_id']])){
|
includes/plugin-pages.php
CHANGED
@@ -683,16 +683,16 @@ vxcf_form::set_form_fields();
|
|
683 |
$form_id=vxcf_form::$form_id;
|
684 |
$data=vxcf_form::get_entries($form_id,'all');
|
685 |
$leads=$data['result'];
|
686 |
-
|
687 |
$fields=vxcf_form::$form_fields;
|
688 |
-
//var_dump($
|
689 |
$field_titles=array('#');
|
690 |
if(is_array($fields)){
|
691 |
foreach($fields as $field){
|
692 |
$field_titles[]=$field['label'];
|
693 |
}
|
694 |
}
|
695 |
-
|
696 |
|
697 |
$fp = fopen('php://output', 'w');
|
698 |
fputcsv($fp, $field_titles);
|
@@ -701,14 +701,22 @@ vxcf_form::set_form_fields();
|
|
701 |
$row=!empty($lead_row['detail']) ? $lead_row['detail'] : array();
|
702 |
$sno++;
|
703 |
$_row=array($sno);
|
704 |
-
foreach($fields as $field){
|
705 |
$val='';
|
706 |
if(!empty($field['name']) && isset($row[$field['name'].'_field'])){
|
707 |
$val=maybe_unserialize($row[$field['name'].'_field']);
|
708 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
$val=implode(' - ',$val);
|
710 |
}
|
711 |
-
}
|
712 |
$_row[]=$val;
|
713 |
|
714 |
}
|
683 |
$form_id=vxcf_form::$form_id;
|
684 |
$data=vxcf_form::get_entries($form_id,'all');
|
685 |
$leads=$data['result'];
|
686 |
+
$extra_keys=array('vxbrowser'=>'browser','vxurl'=>'url','vxscreen'=>'screen','vxcreated'=>'created','vxupdated'=>'updated');
|
687 |
$fields=vxcf_form::$form_fields;
|
688 |
+
//var_dump($fields); die();
|
689 |
$field_titles=array('#');
|
690 |
if(is_array($fields)){
|
691 |
foreach($fields as $field){
|
692 |
$field_titles[]=$field['label'];
|
693 |
}
|
694 |
}
|
695 |
+
// $field_titles[]=__('Created','contact-form-entries');
|
696 |
|
697 |
$fp = fopen('php://output', 'w');
|
698 |
fputcsv($fp, $field_titles);
|
701 |
$row=!empty($lead_row['detail']) ? $lead_row['detail'] : array();
|
702 |
$sno++;
|
703 |
$_row=array($sno);
|
704 |
+
foreach($fields as $k=>$field){
|
705 |
$val='';
|
706 |
if(!empty($field['name']) && isset($row[$field['name'].'_field'])){
|
707 |
$val=maybe_unserialize($row[$field['name'].'_field']);
|
708 |
+
}
|
709 |
+
if(isset($extra_keys[$k]) && isset($lead_row[$extra_keys[$k]])){
|
710 |
+
if($k == 'vxbrowser'){
|
711 |
+
$val=isset($lead_row['browser']) ? $lead_row['browser'].' ' : '';
|
712 |
+
$val.=isset($lead_row['os']) ? $lead_row['os'] : '';
|
713 |
+
}else{
|
714 |
+
$val=$lead_row[$extra_keys[$k]];
|
715 |
+
}
|
716 |
+
}
|
717 |
+
if(is_array($val)){
|
718 |
$val=implode(' - ',$val);
|
719 |
}
|
|
|
720 |
$_row[]=$val;
|
721 |
|
722 |
}
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: crmperks, sbazzi
|
3 |
Tags: contact form 7, contact form 7 database, contact form db, save contact form, contact form 7 entries
|
4 |
Requires at least: 3.8
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 1.0
|
7 |
-
Version: 1.0
|
8 |
Requires PHP: 5.3
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -197,6 +197,10 @@ Contact form 7 entries plugin allows you to save contact form 7 entries to local
|
|
197 |
|
198 |
== Changelog ==
|
199 |
|
|
|
|
|
|
|
|
|
200 |
= 1.0.9 =
|
201 |
* fixed "show starred entries only".
|
202 |
|
2 |
Contributors: crmperks, sbazzi
|
3 |
Tags: contact form 7, contact form 7 database, contact form db, save contact form, contact form 7 entries
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 5.4
|
6 |
+
Stable tag: 1.1.0
|
7 |
+
Version: 1.1.0
|
8 |
Requires PHP: 5.3
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
197 |
|
198 |
== Changelog ==
|
199 |
|
200 |
+
= 1.1.0 =
|
201 |
+
* fixed "source and screen fields in csv file".
|
202 |
+
* fixed "multiple empty tables issue on same page".
|
203 |
+
|
204 |
= 1.0.9 =
|
205 |
* fixed "show starred entries only".
|
206 |
|
templates/leads.php
CHANGED
@@ -584,7 +584,7 @@ $delete_link=$entry_link_f.'&'.vxcf_form::$id.'_action=delete&vx_action='.$nonce
|
|
584 |
<form method="post" id="vx_fields_form">
|
585 |
<div style="max-height: 300px; overflow: auto;">
|
586 |
<?php
|
587 |
-
if(
|
588 |
foreach($fields_arr as $field){
|
589 |
?>
|
590 |
<div class="vx_td_border_bottom">
|
584 |
<form method="post" id="vx_fields_form">
|
585 |
<div style="max-height: 300px; overflow: auto;">
|
586 |
<?php
|
587 |
+
if( !empty($fields_arr) && is_array($fields_arr) ){
|
588 |
foreach($fields_arr as $field){
|
589 |
?>
|
590 |
<div class="vx_td_border_bottom">
|
wp/crmperks-notices.php
CHANGED
@@ -11,7 +11,7 @@ public $option='vxcf_form';
|
|
11 |
public function __construct(){
|
12 |
add_filter('vx_entries_plugin_tabs', array($this, 'add_section_cf'),99);
|
13 |
add_filter( 'plugin_row_meta', array( $this , 'pro_link' ), 10, 2 );
|
14 |
-
add_action( 'after_plugin_row_'.vxcf_form::get_slug(), array( $this, 'plugin_msgs' ),99,3 );
|
15 |
add_action( 'wp_ajax_vxcf_form_review_dismiss', array( $this, 'review_dismiss' ) );
|
16 |
add_action('add_section_vxcf_leads', array($this, 'free_plugins_notice'),99);
|
17 |
|
11 |
public function __construct(){
|
12 |
add_filter('vx_entries_plugin_tabs', array($this, 'add_section_cf'),99);
|
13 |
add_filter( 'plugin_row_meta', array( $this , 'pro_link' ), 10, 2 );
|
14 |
+
//add_action( 'after_plugin_row_'.vxcf_form::get_slug(), array( $this, 'plugin_msgs' ),99,3 );
|
15 |
add_action( 'wp_ajax_vxcf_form_review_dismiss', array( $this, 'review_dismiss' ) );
|
16 |
add_action('add_section_vxcf_leads', array($this, 'free_plugins_notice'),99);
|
17 |
|