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_action('gform_field_content', 'crb_gform_second_column', 10, 5); | |
function crb_gform_second_column($field_content, $field, $value, $zero, $form_id) { | |
# The condition might be different depending on the choosen method | |
if($field->cssClass == 'column_end' || $field->type=='section') { | |
$field_content .= "</ul><ul id='gform_fields_$form_id' class='gform_fields right'>"; | |
} | |
return $field_content; |
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 | |
$a = array('rund' => '2', 'group' => '3', 'kupon' => 'utre', 'tralala' => 'shtur_kupon'); | |
$b = array('grund' => '2', 'group' => 'ww', 'soup' => '1', 'tralala' => 'fd'); | |
function two_arrays_merge_all_values(array $a, array $b) { | |
foreach ($b as $b_key => $b_value) { | |
$last_index_a = count($a)-1; | |
$current_index = 0; | |
foreach ($a as $a_key => $a_value) { |
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 | |
$a = array('rund' => '2', 'group' => '3', 'kupon' => 'utre', 'tralala' => 'shtur_kupon'); | |
$b = array('grund' => '2', 'group' => 'ww', 'soup' => '1', 'tralala' => 'fd'); | |
function two_arrays_merge_all_values(array $a, array $b) { | |
foreach ($b as $b_key => $b_value) { | |
$last_index_a = count($a)-1; | |
$current_index = 0; | |
foreach ($a as $a_key => $a_value) { |
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
/** | |
* Custom Gravity Forms validation - make sure the form isn't submitted with the default values | |
* Useful for when your Gravity Form is displaying default values instead of the field labels. | |
* | |
* In order to apply the function to a specif form, please append _1 ( _2 .. ) to the 'gform_validation' hook. | |
* Example (gform_validation_1) | |
* | |
* @return validation results | |
*/ | |
add_filter( 'gform_validation', 'crb_validate_gravity_default_values' ); |