• Resolved danshousestudio

    (@danshousestudio)


    I would like to see a reset button for a form on the user’s end, so choices made can be cleared.

    More specifically, it would be good to be able to clear radio button selections and bring the form to its original state with no buttons selected.

    Once a radio button is selected, there’s no way to “unselect” it without reloading the page. Checked boxes can be unchecked, but once a radio button is checked, there’s no way to clear that section of the form.

    A reset button on the form that would bring everything back to its original state would be great!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @danshousestudio,

    Trust you are doing good, and thank you for reaching out to us.

    I am afraid, Forminator does not have such an option out of the form. However, you can try using the following workaround.

    <?php
    function custom_forminator_reload_button(){
       
        ob_start(); ?>
    
         <button type="button"; onClick="event.preventDefault(); window.location.reload();">Refresh Page</button>
    
      
        <?php
        
        return ob_get_clean();
    
    }add_shortcode('button-reload','custom_forminator_reload_button');
    
    add_filter( 'forminator_replace_variables', 'do_shortcode' );

    You can replace the “Refresh Page” text with your own text.

    After adding the above code using a mu-plugin, you will need to add an HTML field in your Forminator fields and use this shortcode “[button-reload]”. Please find more about how to add a mu-plugin here: https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#create-the-mu-plugin-file

    I hope that helps. Please test the code on a staging website.

    Kind Regards,
    Nebu John

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @danshousestudio ,

    We haven’t heard from you for over a week 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 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Reset button for forms?’ is closed to new replies.