Version Description
- Fixed issue related to the Contact Form tel field while editing the form data entry.
- Provision to change the number of records to be displayed in listing page from display setting option.
- Fixed issue related to redirection to the first page when a record is been updated from edit data popup.
- Compatible up to PHP 7.1
Download this release
Release Info
Developer | vsourz1td |
Plugin | Advanced Contact form 7 DB |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.3.0
- README.txt +9 -2
- admin/class-advanced-cf7-db-admin.php +17 -4
- admin/js/advanced-cf7-db-admin.js +1 -1
- admin/partials/contact_form_listing.php +13 -2
- advanced-cf7-db.php +1 -1
- includes/class-advanced-cf7-db.php +1 -1
- includes/vsz-cf7-db-function.php +20 -0
README.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: vsourz1td
|
3 |
Tags: contact form 7 db, advanced cf7 db, contact form 7 database, contact form db, contact form 7, database, cf7db, save-contact-form, Save-Forms-Data, import-cf7, export-contact-data, view-cf7-entry
|
4 |
Requires at least: 3.5
|
5 |
-
Tested up to: 4.9.
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -91,6 +91,13 @@ If you think, that you found a bug in our plugin or have any question contact us
|
|
91 |
|
92 |
|
93 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
= 1.2.0 =
|
95 |
* Fix error related to PHP strings.
|
96 |
|
2 |
Contributors: vsourz1td
|
3 |
Tags: contact form 7 db, advanced cf7 db, contact form 7 database, contact form db, contact form 7, database, cf7db, save-contact-form, Save-Forms-Data, import-cf7, export-contact-data, view-cf7-entry
|
4 |
Requires at least: 3.5
|
5 |
+
Tested up to: 4.9.4
|
6 |
+
Stable tag: 1.3.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
91 |
|
92 |
|
93 |
== Changelog ==
|
94 |
+
|
95 |
+
= 1.3.0 =
|
96 |
+
* Fixed issue related to the Contact Form tel field while editing the form data entry.
|
97 |
+
* Provision to change the number of records to be displayed in listing page from display setting option.
|
98 |
+
* Fixed issue related to redirection to the first page when a record is been updated from edit data popup.
|
99 |
+
* Compatible up to PHP 7.1
|
100 |
+
|
101 |
= 1.2.0 =
|
102 |
* Fix error related to PHP strings.
|
103 |
|
admin/class-advanced-cf7-db-admin.php
CHANGED
@@ -106,6 +106,7 @@ class Advanced_Cf7_Db_Admin {
|
|
106 |
////////////// to add admin screens for Contact form Db and Import CSV
|
107 |
function vsz_cf7_plugin_menu(){
|
108 |
///// Menu pages for contact form DB
|
|
|
109 |
add_menu_page( "Advanced CF7 DB", "Advanced CF7 DB", "edit_others_pages", "contact-form-listing", array($this,"vsz_contact_form_callback"), 'dashicons-visibility' , 45);
|
110 |
///// Menu pages for Import CSV
|
111 |
add_submenu_page( 'contact-form-listing', __('Import CSV', 'advanced-cf7-db'), __('Import CSV', ' advanced-cf7-db'), 'manage_options', 'import_cf7_csv',array($this,'vsz_import_cf7_csv') );
|
@@ -282,10 +283,18 @@ class Advanced_Cf7_Db_Admin {
|
|
282 |
<div class="popup-note"><span>You can rename the Field title, Hide field and change the position of fields using Drag and Drop from here.</span></div>
|
283 |
<input type="hidden" name="fid" value="<?php echo $fid; ?>" />
|
284 |
<input type="hidden" name="vsz_cf7_setting_nonce" value="<?php echo $nonce; ?>" />
|
285 |
-
<ul id="cf7d-list-field"
|
|
|
|
|
286 |
//Get form id related fields settings value from option table
|
287 |
$field_settings = get_option('vsz_cf7_settings_field_' . $fid, array());
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
//Check fields setting define or not
|
290 |
if($field_settings == ""){
|
291 |
$field_settings = array();
|
@@ -349,7 +358,9 @@ class Advanced_Cf7_Db_Admin {
|
|
349 |
}//Close if for check remaining fields
|
350 |
}//Close else
|
351 |
?>
|
|
|
352 |
</ul>
|
|
|
353 |
<div id="cf7d-modal-footer">
|
354 |
<input type="submit" name="vsz_save_field_settings" value="Save Changes" class="button button-primary button-large" />
|
355 |
</div>
|
@@ -358,7 +369,8 @@ class Advanced_Cf7_Db_Admin {
|
|
358 |
jQuery(document).ready(function($) {
|
359 |
//For using drag and drop js
|
360 |
jQuery('#cf7d-list-field').sortable({
|
361 |
-
placeholder: "sortable-placeholder"
|
|
|
362 |
});
|
363 |
});
|
364 |
</script>
|
@@ -551,10 +563,11 @@ class Advanced_Cf7_Db_Admin {
|
|
551 |
$arr_fields[$key]['show'] = intval($arrVal['show']);
|
552 |
}
|
553 |
}
|
554 |
-
|
555 |
//Save Settings POPUP information in option table
|
556 |
add_option('vsz_cf7_settings_field_' . $fid, $arr_fields, '', 'no');
|
557 |
update_option('vsz_cf7_settings_field_' . $fid, $arr_fields);
|
|
|
558 |
}//close if for save setting information
|
559 |
|
560 |
//Save form information here
|
106 |
////////////// to add admin screens for Contact form Db and Import CSV
|
107 |
function vsz_cf7_plugin_menu(){
|
108 |
///// Menu pages for contact form DB
|
109 |
+
|
110 |
add_menu_page( "Advanced CF7 DB", "Advanced CF7 DB", "edit_others_pages", "contact-form-listing", array($this,"vsz_contact_form_callback"), 'dashicons-visibility' , 45);
|
111 |
///// Menu pages for Import CSV
|
112 |
add_submenu_page( 'contact-form-listing', __('Import CSV', 'advanced-cf7-db'), __('Import CSV', ' advanced-cf7-db'), 'manage_options', 'import_cf7_csv',array($this,'vsz_import_cf7_csv') );
|
283 |
<div class="popup-note"><span>You can rename the Field title, Hide field and change the position of fields using Drag and Drop from here.</span></div>
|
284 |
<input type="hidden" name="fid" value="<?php echo $fid; ?>" />
|
285 |
<input type="hidden" name="vsz_cf7_setting_nonce" value="<?php echo $nonce; ?>" />
|
286 |
+
<ul id="cf7d-list-field">
|
287 |
+
|
288 |
+
<?php
|
289 |
//Get form id related fields settings value from option table
|
290 |
$field_settings = get_option('vsz_cf7_settings_field_' . $fid, array());
|
291 |
+
$show_record = '';
|
292 |
+
$show_record = get_option('vsz_cf7_settings_show_record_' . $fid, array());
|
293 |
+
if(empty($show_record)){
|
294 |
+
$show_record = 10;
|
295 |
+
}?>
|
296 |
+
<li class="ui-state-disabled"><span class="label">Show record</span> <input class="" type="text" name="cf7_show_record" value="<?php echo $show_record;?>"></li>
|
297 |
+
<?php
|
298 |
//Check fields setting define or not
|
299 |
if($field_settings == ""){
|
300 |
$field_settings = array();
|
358 |
}//Close if for check remaining fields
|
359 |
}//Close else
|
360 |
?>
|
361 |
+
|
362 |
</ul>
|
363 |
+
|
364 |
<div id="cf7d-modal-footer">
|
365 |
<input type="submit" name="vsz_save_field_settings" value="Save Changes" class="button button-primary button-large" />
|
366 |
</div>
|
369 |
jQuery(document).ready(function($) {
|
370 |
//For using drag and drop js
|
371 |
jQuery('#cf7d-list-field').sortable({
|
372 |
+
placeholder: "sortable-placeholder",
|
373 |
+
items: "li:not(.ui-state-disabled)"
|
374 |
});
|
375 |
});
|
376 |
</script>
|
563 |
$arr_fields[$key]['show'] = intval($arrVal['show']);
|
564 |
}
|
565 |
}
|
566 |
+
$show_record = (int)($_POST['cf7_show_record']);
|
567 |
//Save Settings POPUP information in option table
|
568 |
add_option('vsz_cf7_settings_field_' . $fid, $arr_fields, '', 'no');
|
569 |
update_option('vsz_cf7_settings_field_' . $fid, $arr_fields);
|
570 |
+
update_option('vsz_cf7_settings_show_record_' . $fid, $show_record);
|
571 |
}//close if for save setting information
|
572 |
|
573 |
//Save form information here
|
admin/js/advanced-cf7-db-admin.js
CHANGED
@@ -247,7 +247,7 @@ jQuery(document).ready(function($) {
|
|
247 |
}
|
248 |
}
|
249 |
//Check field type is text then execute this code
|
250 |
-
else if(arr_field_type[index]['basetype'] == 'text' || arr_field_type[index]['basetype'] == 'email'){
|
251 |
jQuery('form#cf7d-modal-form-edit-value .field-' + index).attr('value', el);
|
252 |
}
|
253 |
//Set other fields values likes text area and option values
|
247 |
}
|
248 |
}
|
249 |
//Check field type is text then execute this code
|
250 |
+
else if(arr_field_type[index]['basetype'] == 'text' || arr_field_type[index]['basetype'] == 'email' || arr_field_type[index]['basetype'] == 'url'|| arr_field_type[index]['basetype'] == 'tel' || arr_field_type[index]['basetype'] == 'URL' || arr_field_type[index]['basetype'] == 'number' || arr_field_type[index]['basetype'] == 'date' || arr_field_type[index]['basetype'] == 'acceptance' || arr_field_type[index]['basetype'] == 'quiz' ){
|
251 |
jQuery('form#cf7d-modal-form-edit-value .field-' + index).attr('value', el);
|
252 |
}
|
253 |
//Set other fields values likes text area and option values
|
admin/partials/contact_form_listing.php
CHANGED
@@ -104,7 +104,12 @@ else{
|
|
104 |
$search_date_query = '';
|
105 |
|
106 |
//Get post per page value from general setting screen
|
107 |
-
$
|
|
|
|
|
|
|
|
|
|
|
108 |
//Add post per page filter here , Any user call this filter and customize post per page count
|
109 |
$items_per_page = (int)apply_filters('vsz_cf7_entry_per_page', (!empty($posts_per_page) ? $posts_per_page : 10));
|
110 |
//Get current page information from query
|
@@ -336,7 +341,7 @@ else{
|
|
336 |
</div>
|
337 |
</div>
|
338 |
|
339 |
-
<input type="hidden" name="cpage" value="" id="cpage">
|
340 |
<input type="hidden" name="totalPage" value="<?php print ceil($total / $items_per_page);?>" id="totalPage">
|
341 |
</form>
|
342 |
<script>
|
@@ -360,6 +365,12 @@ else{
|
|
360 |
jQuery('#cf7d_setting_form').click(function(){
|
361 |
jQuery('body').addClass('our-body-class');
|
362 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
|
364 |
</script>
|
365 |
</div><?php
|
104 |
$search_date_query = '';
|
105 |
|
106 |
//Get post per page value from general setting screen
|
107 |
+
$show_record = '';
|
108 |
+
$show_record = get_option('vsz_cf7_settings_show_record_' . $fid, array());
|
109 |
+
if(empty($show_record)){
|
110 |
+
$show_record = 10;
|
111 |
+
}
|
112 |
+
$posts_per_page = $show_record;
|
113 |
//Add post per page filter here , Any user call this filter and customize post per page count
|
114 |
$items_per_page = (int)apply_filters('vsz_cf7_entry_per_page', (!empty($posts_per_page) ? $posts_per_page : 10));
|
115 |
//Get current page information from query
|
341 |
</div>
|
342 |
</div>
|
343 |
|
344 |
+
<input type="hidden" name="cpage" value="<?php echo $page;?>" id="cpage">
|
345 |
<input type="hidden" name="totalPage" value="<?php print ceil($total / $items_per_page);?>" id="totalPage">
|
346 |
</form>
|
347 |
<script>
|
365 |
jQuery('#cf7d_setting_form').click(function(){
|
366 |
jQuery('body').addClass('our-body-class');
|
367 |
});
|
368 |
+
//Updating record
|
369 |
+
jQuery(document).on('click','#update_cf7_value',function(){
|
370 |
+
var filterdata = jQuery('.vsz-cf7-listing').html();
|
371 |
+
jQuery('.cf7d-modal-form').append('<div style="display:none">'+filterdata+'</div>');
|
372 |
+
|
373 |
+
});
|
374 |
|
375 |
</script>
|
376 |
</div><?php
|
advanced-cf7-db.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* Plugin Name: Advanced CF7 DB
|
10 |
* Plugin URI: https://wordpress.org/plugins/advanced-cf7-db/
|
11 |
* Description: Save all contact form 7 submitted data to the database, View, Export, ordering, Change field labels, Import data using CSV very easily.
|
12 |
-
* Version: 1.
|
13 |
* Author: Vsourz Digital
|
14 |
* Author URI: https://www.vsourz.com
|
15 |
* License: GPL-2.0+
|
9 |
* Plugin Name: Advanced CF7 DB
|
10 |
* Plugin URI: https://wordpress.org/plugins/advanced-cf7-db/
|
11 |
* Description: Save all contact form 7 submitted data to the database, View, Export, ordering, Change field labels, Import data using CSV very easily.
|
12 |
+
* Version: 1.3.0
|
13 |
* Author: Vsourz Digital
|
14 |
* Author URI: https://www.vsourz.com
|
15 |
* License: GPL-2.0+
|
includes/class-advanced-cf7-db.php
CHANGED
@@ -161,7 +161,7 @@ class Advanced_Cf7_Db {
|
|
161 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
162 |
|
163 |
// Adding custom screen
|
164 |
-
$this->loader->add_action('admin_menu', $plugin_admin, 'vsz_cf7_plugin_menu');
|
165 |
|
166 |
//Get form related fields information
|
167 |
$this->loader->add_filter('vsz_cf7_admin_fields', $plugin_admin,'vsz_cf7_admin_fields_callback', 10, 2);
|
161 |
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
162 |
|
163 |
// Adding custom screen
|
164 |
+
$this->loader->add_action('admin_menu', $plugin_admin, 'vsz_cf7_plugin_menu',9);
|
165 |
|
166 |
//Get form related fields information
|
167 |
$this->loader->add_filter('vsz_cf7_admin_fields', $plugin_admin,'vsz_cf7_admin_fields_callback', 10, 2);
|
includes/vsz-cf7-db-function.php
CHANGED
@@ -308,7 +308,27 @@ function vsz_display_field_type_value($type,$arr_field_type,$k,$v){
|
|
308 |
$loading = __('Loading...');
|
309 |
$disable = 'readonly';
|
310 |
echo sprintf("<li><span class=\"label\">%s</span> <input class=\"field-%s\" type=\"text\" name=\"field[%s]\" value=\"%s\" %s /></li>", $label, $k, $k, $loading, $disable);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
}
|
|
|
312 |
}
|
313 |
|
314 |
//Define sheet related date formates
|
308 |
$loading = __('Loading...');
|
309 |
$disable = 'readonly';
|
310 |
echo sprintf("<li><span class=\"label\">%s</span> <input class=\"field-%s\" type=\"text\" name=\"field[%s]\" value=\"%s\" %s /></li>", $label, $k, $k, $loading, $disable);
|
311 |
+
}else if($type == 'tel'){
|
312 |
+
|
313 |
+
if(is_array($v)){
|
314 |
+
$label = esc_html($v['label']);
|
315 |
+
}
|
316 |
+
else{
|
317 |
+
$label = esc_html($v);
|
318 |
+
}
|
319 |
+
$loading = __('Loading...');
|
320 |
+
echo sprintf("<li><span class=\"label\">%s</span> <input class=\"field-%s\" type=\"text\" name=\"field[%s]\" value=\"%s\" /></li>", $label, $k, $k, $loading);
|
321 |
+
}else if($type == 'url' || $type == 'number' || $type == 'date' || $type == 'acceptance' || $type == 'quiz'){
|
322 |
+
if(is_array($v)){
|
323 |
+
$label = esc_html($v['label']);
|
324 |
+
}
|
325 |
+
else{
|
326 |
+
$label = esc_html($v);
|
327 |
+
}
|
328 |
+
$loading = __('Loading...');
|
329 |
+
echo sprintf("<li><span class=\"label\">%s</span> <input class=\"field-%s\" type=\"text\" name=\"field[%s]\" value=\"%s\" /></li>", $label, $k, $k, $loading);
|
330 |
}
|
331 |
+
|
332 |
}
|
333 |
|
334 |
//Define sheet related date formates
|