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 | |
add_filter( 'cf_paypal_request', function( $request, $process, $form ) { | |
//SET THE FORM ID AND THE FIELD ID ( DROPDOWN FIELD WITH CURRENCY OPTIONS ) | |
$form_id = 'CF5a5e8452c6f82'; | |
$field_id = 'fld_8085538'; | |
if ( $form['ID'] === $form_id ) { | |
if ( $process['data'][$field_id] === 'USD' ) { | |
$request[ 'PAYMENTREQUEST_0_CURRENCYCODE' ] = 'USD'; |
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 | |
add_action( 'caldera_forms_redirect_preprocess', function( $url, $form, $process_id ){ | |
//Change the Form ID | |
if( $form['ID'] === 'CF5a5e8452c6f82' ) { | |
//Set the recipient the sbuject and the message | |
$recipient = '[email protected]'; | |
$subject = 'My Email Subject'; | |
$message = 'My Email content'; |
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 redirection | |
* Description: Customization for the Caldera Forms redirect processor. | |
* Version: 0.0.1 | |
* Author: New0 | |
* Author URI: https://github.com/New0 | |
*/ | |
add_action('caldera_forms_redirect', function($type, $url, $form){ |
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 | |
add_action( 'caldera_forms_redirect', function( $type, $url, $form ){ | |
//Change the Form ID | |
if( $form['ID'] === 'CF5a5e8452c6f82' ) { | |
//Set the recipient the sbuject and the message | |
$recipient = '[email protected]'; | |
$subject = 'My Email Subject'; | |
$message = 'My Email content'; | |
global $transdata; | |
$form['mailer']['recipients'] = $recipient; |
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 | |
add_filter( 'caldera_forms_field_attributes', function( $attrs, $field ){ | |
//Change fld_2910574 with the correct ID of the field | |
if( 'fld_2910574' === $field[ 'ID' ] ) { | |
$attrs[ 'disabled' ] = "disabled"; | |
} | |
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 | |
add_filter( 'cf_mailchimp_request_data', function( $request_data, $config, $form ){ | |
//EDIT THE FORM ID | |
if( $form['ID'] === 'CF5a5e8452c6f82' ) { | |
global $transdata; | |
//EDIT THE FORM ID | |
if( $transdata['data']['fld_6071068'] === 'field_value' ) { |
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 | |
/* | |
* Transform data from file field and update gallery custom field for first listing | |
* | |
*/ | |
add_action( 'caldera_forms_submit_complete', function( $form, $referrer, $process_id, $entryid ) { | |
if( 'CF5a96a2f82ed78' === $form[ 'ID' ] ) { | |
//change your field ID here | |
$imgs = Caldera_Forms::get_field_data( 'fld_1166289', $form ); | |
$attachments_array = array(); |
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: Direct Stripe custom hooks | |
* Author: Nicolas Figueira | |
* | |
*/ | |
//Add a textarea before the button | |
add_action( 'direct_stripe_before_button', 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 | |
/* | |
* Transform data from file field and update gallery custom field | |
* Documentation at -- https://gist.github.com/New0/10fd66ccf144930b69d28781e90fc689#file-cf-to-acf-google-map-field-md -- | |
* | |
*/ | |
add_action( 'caldera_forms_submit_complete', function( $form, $referrer, $process_id, $entryid ) { | |
//change your form ID here | |
if( 'CF5a5e8452c6f82' != $form[ 'ID' ] ) { | |
return; |