This file contains hidden or 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
.direct-stripe { margin: 0; } |
This file contains hidden or 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
/* | |
* | |
* Sends and independant email with a reset password link | |
* | |
*/ | |
add_action( 'caldera_forms_do_mailer', function( $mail, $data, $form ) { | |
if( 'CF5e85b15e45b2a' == $form[ 'ID' ] ) { // Use you own Form ID instead of CF5e85b15e45b2a | |
$user_email = $data['fld_6009157']; // Use the ID of the email field that defines the user instead of fld_6009157 |
This file contains hidden or 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
/** All the sizes need to be adjusted to the webpage design and image size **/ | |
/* Add the class image_checkbox to the checkbox field and the class image_display to the html field that contains the image */ | |
.image_checkbox label, | |
.image_display img | |
{ | |
max-width: none; | |
} | |
.image_display { | |
position: absolute; | |
margin-top: -2.5rem; |
This file contains hidden or 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_filter( 'direct_stripe_donation_input', function( $input ){ | |
$symbol = '<span style="font-size: 1.2em;">$ </span>'; // Edit the symbol to suit your currency | |
$input = $symbol . $input; | |
return $input; | |
}); |
This file contains hidden or 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 | |
//Use caldera_forms_field_attributes filter hook | |
add_filter( 'caldera_forms_field_attributes', function( $attrs, $field, $form ){ | |
//REPLACE fld_******* BY YOUR OWN FIELD IDs | |
//Min and max 5 | |
if( 'fld_4009904' === $field[ 'ID' ] ) { | |
$attrs[ 'pattern' ] = ".{5,5}"; | |
} |
This file contains hidden or 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
/* | |
* Change Caldera Forms Toggle Switch Buttons To Images | |
* Read https://gist.github.com/New0/7e385d497052a4fd171314b299f3dd13#file-cf-toggle-img-replacement-md | |
*/ | |
/* Hide original Toggle Field */ | |
.cf-toggle-group-buttons a { | |
visibility: hidden; | |
} | |
/* First toggle option */ | |
.cf-toggle-group-buttons a:nth-child(1):before { |
This file contains hidden or 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
//Replace #fld_8768091_1-wrap by the field ID found with developer console. | |
add_action( 'wp_footer', function(){ | |
echo "<script> | |
jQuery(document).ready(function(){ | |
jQuery('#fld_8768091_1-wrap').attr('tabindex','0'); | |
jQuery('#fld_9970286_1-wrap').attr('tabindex','1'); | |
jQuery('#fld_6009157_1-wrap').attr('tabindex','2'); | |
}); | |
</script>"; | |
}, 10 ); |
This file contains hidden or 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( 'wp_footer', function(){ | |
echo "<script> | |
jQuery(document).ready(function() { | |
//CHANGE THE IDs TO MATCH YOUR FIELDS, these are frontend IDs, usually the field ID looking like fld_7683514 will be transformed as #fld_7683514_1 | |
var textarea = '#fld_7683514_1'; //ID of the textarea we want to count words | |
var hidden_value = '#fld_8293824_1'; //ID of the hidden field we want to print count in value parameter |
This file contains hidden or 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: CF custom code | |
*/ | |
add_action( 'wp_footer', function() { | |
echo '<script> | |
jQuery( ".caldera-grid .CF5a5fc16500e92 .checkbox Label" ).click(function() { | |
$( this ).toggleClass( "checked" ); | |
}); | |
</script>'; |