Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function red_new_business_inquiry_submission( $entry, $form ) {
- add_filter( 'wpf_crm_object_type', function( $object_type ) {
- return 'Inquiry_Form__c';
- } );
- $contact_data = array(
- 'Contact__c' => rgar( $entry, '1.3' ),
- 'Name' => rgar( $entry, '1.3' ),
- );
- $object_id = wp_fusion()->crm->add_contact( $contact_data, false );
- if( is_wp_error( $object_id ) ) {
- wp_fusion()->logger->handle( $object_id->get_error_code(), $user_id, 'Error adding object to ' . wp_fusion()->crm->name . ': ' . $object_id->get_error_message() );
- }
- }
- // UNCOMMENT TO ACTIVATE
- add_action( 'gform_after_submission_1', 'red_new_business_inquiry_submission', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement