Title: How to deactivate Scrolltop function?
Last modified: January 19, 2021

---

# How to deactivate Scrolltop function?

 *  Resolved [afizan75](https://wordpress.org/support/users/afizan75/)
 * (@afizan75)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/how-to-deactivate-scrolltop-function/)
 * Hi there
 * How can I deactivate scrolltop function> I found it really annoying. There is
   no option in the back end.
 * Thank you

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

 *  [thethemefoundry](https://wordpress.org/support/users/thethemefoundry/)
 * (@thethemefoundry)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/how-to-deactivate-scrolltop-function/#post-13933850)
 * Hey there! 👋
 * HappyForms doesn’t include a visual control for that, but you can use a simple
   PHP snippet. Just pop the below code in your `functions.php` file:
 *     ```
       function happyforms_custom_form_attributes( $attrs ) {
           $attrs['data-happyforms-scroll-disabled'] = true;
   
           return $attrs;
       }
   
       add_filter( 'happyforms_get_form_attributes', 'happyforms_custom_form_attributes' );
       ```
   
 * That should do the trick. Let us know how you go!
 *  Thread Starter [afizan75](https://wordpress.org/support/users/afizan75/)
 * (@afizan75)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/how-to-deactivate-scrolltop-function/#post-13935993)
 * Thank you, sir. The snippet work like a charm.
 *  [thethemefoundry](https://wordpress.org/support/users/thethemefoundry/)
 * (@thethemefoundry)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/how-to-deactivate-scrolltop-function/#post-13938942)
 * Wonderful! 👏
 * We’re here in case anything else crops up.

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

The topic ‘How to deactivate Scrolltop function?’ is closed to new replies.

 * ![](https://ps.w.org/happyforms/assets/icon-256x256.png?rev=2778164)
 * [Happyforms - Form Builder for WordPress: Drag & Drop Contact Forms, Surveys, Payments & Multipurpose Forms](https://wordpress.org/plugins/happyforms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/happyforms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/happyforms/)
 * [Active Topics](https://wordpress.org/support/plugin/happyforms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/happyforms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/happyforms/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [thethemefoundry](https://wordpress.org/support/users/thethemefoundry/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/how-to-deactivate-scrolltop-function/#post-13938942)
 * Status: resolved