Last active
January 24, 2024 22:34
-
-
Save Shelob9/4015f6489ee94e6ee743db4f359f14d4 to your computer and use it in GitHub Desktop.
Change field value for field set by Caldera Forms incremental value processor using the caldera_forms_submit_complete action See: https://calderaforms.com/doc/caldera_forms_submit_complete/
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 | |
/** | |
* Change field value for field set by Caldera Forms incremental value processor | |
*/ | |
add_action( 'caldera_forms_submit_complete',function( $form, $referrer, $process_id, $entryid ){ | |
//change form ID to match your form | |
if( 'CF111' === $form[ 'ID' ] ){ | |
//change field to match field used with processor | |
$field_id = 'fl1345'; | |
//get saved field value | |
$value = Caldera_Forms::get_field_data( $field_id, $form, $entryid ); | |
if( $value ){ | |
//change and save | |
$value = 'PX-' . $value; | |
Caldera_Forms::set_field_data( $field_id, $value, $form, $entryid ); | |
} | |
} | |
}, 5, 4); |
Dear Josh
code works fine to change prefix on generated summary for email automatic entry email. But in autoresponder and copy of email still the numeric count is send. We used LM-30-144 (works on entry email) autoresponder shows 144.
Any idea to fix that? Best regards Marc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changes required to use this code on your site: