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
<div style="text-align: center; font-size: 2em;"> | |
<div style="border: 5px solid #b3e6ff; padding: 2% 3% 2% 3%; max-width: 650px; margin: 1% auto 1% auto; background-color: #b3e6ff; color: white;">My PDF Submission</div> | |
<div></div> | |
</div> | |
<div style="text-align: left; font-size: 1.2em;"> | |
<div style="border: 2px solid #b3e6ff; padding: 2% 3% 2% 3%; max-width: 650px; margin: 1% 10% 1% 10%; background-color: white; color: black;"> | |
<p style="text-align: center;"> | |
Hello %first_name% %last_name% |
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 | |
/** | |
* Filter the email sent via the autoresponse processor | |
*/ | |
add_filter( 'caldera_forms_autoresponse_mail', function( $email_message, $config, $form, $entry_id){ | |
$entry = Caldera_Forms::get_entry($entry_id,$form); | |
return $email_message; | |
}, 10, 4 ); |
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 Render Notice data | |
* Description: Filter Caldera Forms render notice data and use data from the form submission. | |
* Author: New0 Nico Figueira | |
*/ | |
add_filter( 'caldera_forms_render_notices', function( $notices ){ | |
//Set the correct corresponding field ID we want the data from/ |
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 featured image | |
* Author: New0 | |
* Description: Use an advanced File Field 2.0 to save a file as a featured image in a post created via the Save as Post Type processor. | |
* | |
*/ | |
//Get File and Post ID before setting the featured image | |
add_action('caldera_forms_submit_complete', function($form, $referrer, $process_id, $entry_id){ | |
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 File Error On Page Nav | |
* Description: Check if a File Type error is displayed during Next page button click and prevents navigation if found. | |
* Author: New0 | |
*/ | |
// Add jQuery to document footer | |
add_action('wp_footer', function(){ | |
?> |
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 Dynamic Braintree Plans | |
* Description: Set a different Braintree Plan ID based on a fields value, using one Braintree processor | |
* Author: New0 | |
*/ | |
/* Create a Dropdown select field and set the values of each otpion with the ID of a Braintree Plan. T | |
Then copy and paste this dropdown select field in the code below */ |
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 | |
/* | |
* HTML5 Pattern to limiot input field to 8 alphanumeric (only capitals) characters | |
*/ | |
add_filter( 'caldera_forms_field_attributes', function($attrs, $field){ | |
//IMPORTANT - Change your field ID | |
if ( 'fld_1234' === $field[ 'ID'] ) { | |
$attrs[ 'pattern' ] = '[A-Z0-9]{8}'; | |
} | |
return $attrs; |
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 | |
/* | |
* This is very basic, you may want to target a precise $form, $magics or type of $value using conditions. | |
*/ | |
add_filter( 'caldera_forms_do_field_bracket_value', function($value, $magics, $entry_id, $form ){ | |
return implode("",explode("\\",$value)); | |
}, 10, 4); |
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 | |
/* | |
* Set the HTTP_USER_AGENT as the value of a hidden field during submission | |
* In this case the hidden field ID is fld_7526079, that needs to be edited | |
*/ | |
add_filter( 'caldera_forms_process_field_hidden', function( $value, $field ) { | |
//Change your field ID here | |
if( $field['ID'] === "fld_7526079" ){ | |
$value = $_SERVER['HTTP_USER_AGENT']; |