This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* If you need to make some of the GravityView search fields required before search is submited | |
* - add as many lines as you need to define which fields are required | |
* e.g. -> jQuery('#gv_search_XYZZ').prop('required', true ); | |
* | |
* Add this gist to your theme functions.php | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: GravityView - Custom Required Search Fields | |
Plugin URI: https://gravityview.co/ | |
Description: Custom Add-on to make certain GravityView Search fields required before performing the search | |
Author: Katz Web Services, Inc. | |
Version: 1.0.0 | |
Author URI: http://www.katzwebservices.com | |
Copyright 2014 Katz Web Services, Inc. (email: info@katzwebservices.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: GravityView - force login before single view | |
Plugin URI: https://gravityview.co/ | |
Description: Redirect visitors to login page before seeing the single entry view | |
Author: Katz Web Services, Inc. | |
Version: 1.0.0 | |
Author URI: http://www.katzwebservices.com | |
Copyright 2015 Katz Web Services, Inc. (email: info@katzwebservices.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Add this to your theme's functions.php file */ | |
// Adds a 'clear' button to your GravityView Search Bar | |
add_action( 'gravityview_search_widget_fields_after', 'my_gv_clear_search_button' ); | |
function my_gv_clear_search_button() { | |
$url = strtok( add_query_arg( array() ), '?' ); | |
?> | |
<a href="<?php echo esc_url( $url ); ?>" class="button gv-search-button">Clear</a> | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Place this in your theme's functions.php | |
* Please adapt the form_id and the field key to your own case. | |
* This is intended to force GravityView to search for the exact value instead of be more relaxed (default search uses operator LIKE) | |
* | |
*/ | |
add_filter( 'gravityview_fe_search_criteria', 'my_gv_exact_search', 20, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Do not allow a certain user to edit a field if that field has a specific value | |
* | |
* Replace the following to your own values: | |
* - REPLACE_BY_FORM_ID, use the form id where this logic applies | |
* - REPLACE_BY_FIELD_ID, use the field id where this logic applies | |
* | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Supported on GravityView 1.6 | |
* | |
* Add this to your theme's functions.php file | |
* | |
* Replace the string 'MY NEW LABEL' for your own | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: GravityView - Disable DataTables processing indicator. | |
* Plugin URI: http://gravityview.co/extensions/datatables/ | |
* Description: Disable the DataTables display of a 'processing' indicator when the table is being processed (e.g. a sort). | |
* Version: 1.0 | |
* Author: Katz Web Services, Inc. | |
* Author URI: http://www.katzwebservices.com | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change the field separator when exporting a DataTable view into a CSV file | |
* Replace MY_FIELD_SEPARATOR by the new separator character like '|' or ';' | |
*/ | |
function my_gv_datatables_csv_export_separator( $config, $view_id ) { | |
if( empty( $config['tableTools']['aButtons'] ) ) { | |
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: GravityView - Disable DataTables Search Filter and paging | |
* Plugin URI: http://gravityview.co/extensions/datatables/ | |
* Description: Disable the DataTables search filter and paging input. | |
* Version: 1.0 | |
* Author: Katz Web Services, Inc. | |
* Author URI: http://www.katzwebservices.com | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
OlderNewer