Using Branda soon page with Forminator
-
Hello. I have setup a Branda coming soon page. I want to embed an enquiry form on the page too. I made a Forminator contact form which works on the site. I used the shortcode on the Branda soon page. It displays and submits the form but it has none of the CSS loading with it. Is there a way to get Forminator to work nicely on the soon page?
Thanks.
-
HI @katmacau,
I’m afraid, this is more of a bug which our team is aware of and is working on a fix. I’m reporting this ticket to our developer’s attention so that they are aware of your issue and will check if there is any workaround that could be suggested temporarily.
Will keep you updated once we get further update asap.
Kind Regards,
NithinThat’s unfortunate. Are their any actions I could add to my themes function file that I could use to force it to load the Forminator Assets?
Or does the Branda coming soon setting allow your to make certain pages of your site public? For example, some other coming soon plugins allow you to make certain pages public. I could use that to make a enquiry page which excludes links to other pages in the site via my theme setup.
Thanks
Hi @katmacau,
I got further updates until it’s fixed within the plugin side, you can try this snippet to ensure the assets from Forminator loads.
<?php add_action( 'wp_head', function() { $form_id = 224; $view = new Forminator_CForm_Front(); $view->model = Forminator_Form_Model::model()->load( $form_id ); $view->enqueue_form_scripts( true ); },0);You’ll have to make sure to update your form ID in the following line of the given code:
$form_id = 224;Suppose your form ID is 123, then the above line will be:
$form_id = 123;You can implement the above code as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-pluginsOr does the Branda coming soon setting allow your to make certain pages of your site public?
I’m afraid, there isn’t such a feature at the moment. We are working on a similar feature where you should be able to configure pages but at the moment there isn’t any exact ETA.
Please do let us know how the given codes go.
Kind Regards,
NithinThat worked for the styling. Thanks. The for submitted but the confirmation did not show. that seems to be the only issue with it now.
Hi @katmacau
We pinged our Second Line Support to verify it, I could replicate it.
Since it is expected not to have the form it may be a limitation to show the confirmation.
We will keep you posted.
Best Regards
Patrick FreitasHello @katmacau
Please add the following snippet just after the previously provided code:
add_filter( 'forminator_form_submit_response', 'wpmudev_fix_submission_message_branda', 20, 2 ); add_filter( 'forminator_form_ajax_submit_response', 'wpmudev_fix_submission_message_branda', 20, 2 ); function wpmudev_fix_submission_message_branda( $response, $form_id ){ if( $form_id != 361 ){ //Please change the form ID return $response; } if( $response['success'] ){ $GLOBALS['fm_success_message'] = $response['message']; }else{ $GLOBALS['fm_error_message'] = $response['message']; } add_action('wp_head', 'wpmudev_show_success_message_branda'); return $response; } function wpmudev_show_success_message_branda(){ if( !empty( $GLOBALS['fm_success_message'] ) ){ ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('.branda-maintenance #forminator-module-361 .forminator-response-message').removeClass('forminator-error').addClass('forminator-success').addClass('forminator-show').html('<?php echo $GLOBALS['fm_success_message'] ?>'); }); </script> <?php } if( !empty( $GLOBALS['fm_error_message'] ) ){ ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('.branda-maintenance #forminator-module-361 .forminator-response-message').addClass('forminator-show').html('<?php echo $GLOBALS['fm_error_message'] ?>'); }); </script> <?php } }Form ID should be changed from 361 to your form’s ID in the following lines:
1.
if( $form_id != 361 ){2.
jQuery('.branda-maintenance #forminator-module-361 .forminator-response-message').removeClass('forminator-error').addClass('forminator-success').addClass('forminator-show').html('<?php echo $GLOBALS['fm_success_message'] ?>');3.
jQuery('.branda-maintenance #forminator-module-361 .forminator-response-message').addClass('forminator-show').html('<?php echo $GLOBALS['fm_error_message'] ?>');Warm regards,
DimitrisThank you. That worked.
Hello. This has stopped working after running recent plugin updates. Please advise what I should update it to?
Hi @katmacau
I just tested it on my setup and currently all that was needed was just this basic code initially given in this post (without later addition shared by Dimitris):
https://wordpress.org/support/topic/using-branda-soon-page-with-forminator-2/#post-15786988
Would you try that (make sure to clear all caches on site/server after change)?
Kind regards,
Adam
The topic ‘Using Branda soon page with Forminator’ is closed to new replies.