Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Filters for modifying Converkit sequence ID or Converkit form ID when using Caldera Forms ConvertKit processor to subscribe users to Convertkit on WordPress site. https://calderaforms.com/downloads/convertkit-caldera-forms/
<?php
add_filter( 'cf_convertkit_form_id', function( $ck_form_id, $form ){
//Only act on certain form (update your form ID!)
if( $form[ 'ID' ] == 'cf1234565' ){
//check the value of a field and change ConvertKit field ID if it matched
if( 'Shawn M. Hooper' === Caldera_Forms::get_field_data( 'fld_123456', $form ) ){
$ck_form_id = 42;
}
return $ck_form_id;
}
}, 20, 2);
<?php
add_filter( 'cf_convertkit_sequence_id', function( $ck_sequence_id, $form ){
//Only act on certain form (update your form ID!)
if( $form[ 'ID' ] == 'cf1234565' ){
//check the value of a field and change ConvertKit field ID if it matched
if( 'Roy Sivan' === Caldera_Forms::get_field_data( 'fld_123456', $form ) ){
$ck_sequence_id = 42;
}
}
return $ck_sequence_id;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.