Title: Captain forms: contact button disappear when using java minification
Last modified: December 15, 2017

---

# Captain forms: contact button disappear when using java minification

 *  Resolved [deathstar0pth](https://wordpress.org/support/users/deathstar0pth/)
 * (@deathstar0pth)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/captain-forms-contact-button-disappear-when-using-java-minification/)
 * Unfortunately I have a problem I can’t solve. I use Captain Forms on my websites.
   In the header.php I implemented the following code to have a floating button 
   sticked left on every page:
 * <?php if(function_exists(‘captain_form’)) echo captain_form(926558, array(‘lightbox’
   =>’1’, ‘text_content’=>’Kontakt’, ‘text_color’=>’FFFFFF’, ‘bg_color’=>’FF0000’,‘
   position’=>’right’, ‘type’=>’floating-button’)); ?>
 * When I optimize Java scripts the button disappear. I already tried different 
   things to avoid that. For example I tried to wrap an script (<script id=”anyword”
   >….</script> around the function and excluded this script from java script optimizations.
   The effect was my site only loaded the background (not more).
 * Could you help me how to exclude this script from java minification?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcaptain-forms-contact-button-disappear-when-using-java-minification%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/captain-forms-contact-button-disappear-when-using-java-minification/#post-9786962)
 * well, try adding `captainform` to the comma-separated JS optimization exclusion
   field maybe (that string seems to match both the linked JS as the path to the
   JS files contains that string as the inline JS which also contains that same 
   string)?
 * hope this helps,
    frank
 *  Thread Starter [deathstar0pth](https://wordpress.org/support/users/deathstar0pth/)
 * (@deathstar0pth)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/captain-forms-contact-button-disappear-when-using-java-minification/#post-9790431)
 * Nope. adding `captainform` didn’t solved the problem.
 * But I noticed If i keep standard settings `seal.js, js/jquery/jquery.js` then
   it works.
 * Thanks for your response
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/captain-forms-contact-button-disappear-when-using-java-minification/#post-9790582)
 * great job @deathstart0pth, thanks for the feedback!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Captain forms: contact button disappear when using java minification’
is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

 * [java](https://wordpress.org/support/topic-tag/java/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/captain-forms-contact-button-disappear-when-using-java-minification/#post-9790582)
 * Status: resolved