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
// enable input mask for form #95 list field #3 columns 1 and 3 | |
add_filter('gform_register_init_scripts_95', 'enable_list_input_mask'); | |
function enable_list_input_mask($form) { | |
$field_id = "3"; //set field id here | |
$col_id = array('1','3'); //set column id here | |
$mask = "9999"; //define mask here, examples at http://www.gravityhelp.com/documentation/page/Input_Mask | |
//that's it nothing more to configure | |
$c_sel = array(); | |
foreach($col_id as $c) { |
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 | |
class RW_Delete_Entry { | |
function __construct() { | |
if( ! property_exists( 'GFCommon', 'version' ) || ! version_compare( GFCommon::$version, '1.8.5.8', '>=' ) ) | |
return; | |
add_filter( 'gform_tooltips', array( $this, 'add_delete_tooltip') ); | |
add_filter( 'gform_form_settings', array( $this, 'add_delete_setting' ), 10, 2 ); | |
add_action( 'gform_pre_form_settings_save', array( $this, 'save_delete_setting' ), 10 ); | |
add_action( 'gform_after_submission', array( $this, 'maybe_delete_form_entry' ), 15, 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
function listFieldDatepicker(formId, fieldId, column) { | |
var listField = '#field_' + formId + '_' + fieldId, | |
columnClass = '.gfield_list_' + fieldId + '_cell' + column + ' input'; | |
jQuery.datepicker.setDefaults({ | |
showOn: 'both', | |
buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', | |
buttonImageOnly: true, | |
dateFormat: 'dd/mm/yy', | |
firstDay: 1 | |
}); |
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: Gravity Forms - Notification Extras | |
* Author: Richard Wawrzyniak | |
* Description: Adds new settings to Gravity Forms Notifications enabling file uploads to be attached to notifications and the notification format to be changed to text. | |
* Version: 1.0 | |
* | |
* Last Modified: 17/10/2014 | |
* Updated attach_file() to allow for possibility that uploads folder was changed | |
* Added suppot for post_image fields |
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_filter( 'gform_pre_render', 'log_pre_render' ); | |
function log_pre_render( $form ) { | |
GFCommon::log_debug( "log_pre_render(): \$form => " . print_r( $form, true ) ); | |
return $form; | |
} | |
add_action( 'gform_pre_process', 'log_pre_process' ); | |
function log_pre_process( $form ) { |
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
/** | |
* Performs spam check and returns result to Gravity Forms. | |
* | |
* @param bool $is_spam Indicates if the entry is to be marked as spam. | |
* @param array $form The form currently being processed. | |
* @param array $entry The entry being evaluated. | |
* | |
* @return bool | |
*/ | |
function your_gform_entry_is_spam_callback( $is_spam, $form, $entry ) { |
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
add_action( 'gform_pre_submission_8', 'uploads_log_pre_submission' ); | |
function uploads_log_pre_submission( $form ) { | |
foreach ( $form["fields"] as &$field ) { | |
if ( $field["type"] == "fileupload" ) { | |
$id = "input_".$field["id"]; | |
if ( $field["multipleFiles"] ) { | |
if ( empty( $_POST["gform_uploaded_files"] ) ) | |
continue; |
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 | |
// move radio input inside label | |
add_filter("gform_field_choices", "radio_input_inside_label", 10, 2); | |
function radio_input_inside_label($choices, $field){ | |
if($field["type"] != "radio") | |
return $choices; | |
$choices = ""; |
NewerOlder