Title: Default settings for behaviour
Last modified: July 14, 2022

---

# Default settings for behaviour

 *  Resolved [chromaside](https://wordpress.org/support/users/chromaside/)
 * (@chromaside)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/default-settings-for-behaviour/)
 * Hello!
 * Working with the Forminator plugin to run polls for our News website. It works
   great, but I did run into a problem – when a user votes on a poll, instead of
   the page reloading it redirects to a 404.
 * However, I can bypass this issue by having polls reload using AJAX – which is
   set in behaviour settings under Submission Method.
 * My question – can I setup the plugin to DEFAULT to the Ajax submission method?
   I see appearance defaults but nothing for behaviour.
 * Thanks!

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

 *  Plugin Support [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * (@wpmudev-support9)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/default-settings-for-behaviour/#post-15829079)
 * Hello [@chromaside](https://wordpress.org/support/users/chromaside/) !
 * Hope you’re doing great today!
 * At the moment we don’t have a setting to set the default submission behaviour
   so it would have to be set manually each time for new polls.
 * However, I’ve asked our Second Line Support team to check if it would be possible
   to override that with a snippet. We’ll share feedback here as soon as we hear
   back from them.
 * Warm regards,
    Pawel
 *  Plugin Support [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * (@wpmudev-support9)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/default-settings-for-behaviour/#post-15831314)
 * Hello [@chromaside](https://wordpress.org/support/users/chromaside/) !
 * Good news, it’s possible to set that using a small snippet:
 *     ```
       <?php
   
       add_filter( 'forminator_poll_settings', 'wpmudev_update_poll_behavior', 10, 4 );
       function wpmudev_update_poll_behavior( $form_settings, $model, $data, $cls ){
       	if( $model->status == 'draft' && !($model->behaviors) ){
       		if( !isset( $form_settings['enable-ajax'] ) ){
       			$form_settings['enable-ajax'] = 'true';
       		}
       	}
       	return $form_settings;
       }
       ```
   
 * I’ve tested it on my testing site and it worked correctly. It will set all newly
   created polls to reload using Ajax.
 * To install the snippet:
    – copy the code to a .php file with any name – upload
   the file to wp-content/mu-plugins/ directory (create if doesn’t exist) – test
   by creating a new poll
 * Warm regards,
    Pawel
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/default-settings-for-behaviour/#post-15925940)
 * Hello [@chromaside](https://wordpress.org/support/users/chromaside/)
 * We haven’t heard from you for several days now, so it looks like you don’t need
   our assistance anymore.
 * Feel free to re-open this ticket if needed.
 * Kind regards
    Kasia

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

The topic ‘Default settings for behaviour’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/default-settings-for-behaviour/#post-15925940)
 * Status: resolved