Last active
June 22, 2024 22:05
-
-
Save LaxusCroco/3cc5e86c6c875ac17561e7881de2375f to your computer and use it in GitHub Desktop.
Inserted CCT ID option for JetFormBuilder forms
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 | |
/** | |
* Pay attention! | |
* The 'main_cct' part must be replaced with the slug of the CCT from your website. | |
*/ | |
add_action( 'jet-engine/custom-content-types/created-item/main_cct', function ( $item, $item_id, $item_handler ) { | |
jet_form_builder()->form_handler->action_handler->request_data['inserted_cct_id'] = $item_id; | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment