How to Hide Inline Module if User has already filled the form and cookie is set?

You can hide the inline module after a user has filled the inline form successfully.

You need to set cookies enabled and use ‘cp_target_page_settings‘ filter provided by Convert Plus. This handles the visibility of the modules as per users need.

You can refer to the following code –

/**
* Callback function to add more conditions for target page settings
*
* @param bool $display
* @param string $style_id
* @return bool $display
*/
function your_callback_function( $display, $style_id ) {

// Replace style id with your style ID
if( $style_id == 'cp_id_8f3d1' ) {

// your custom logic
if( isset($_COOKIE['cp_id_8f3d1']) ) {
$display = false;
}
}

return $display;
}
add_filter( 'cp_target_page_settings', 'your_callback_function', 10, 3 );

To know more about the target page settings, you can refer to the article here.

Not the solution you are looking for? Check other articles, or open a support ticket.