• Resolved loppisinorge

    (@loppisinorge)


    Hi, i want to add user a second option when reseting the field.

    For instace, when pressing the reset button, i want a second option to appear with the text: “Are you sure you want to reset?”

    Is this possible to do?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @loppisinorge

    Yes, that’s possible.

    Please, follow the steps below:

    1. Select the button option as the button’s type.

    2. Enter the following piece of code as the onmousedown event:

    var me = jQuery(this);
    me.removeClass('reset-button');
    if (window.confirm('Are you sure')){ 
    me[0].form.reset();
    me.addClass('reset-button').click(); 
    }

    Best regards.

    Thread Starter loppisinorge

    (@loppisinorge)

    thanks it worked. But when i press to decline, it still wipes out all the data that has been put in. But when i refresh, the data is still there. A bit weird

    Plugin Author codepeople

    (@codepeople)

    Hello @loppisinorge

    The fields’ values are loaded when you refresh the page because you have enabled the browser’s persistence. It is a checkbox in the “Form Settings” tab (https://resources.developers4web.com/cff/images/documentation/form-settings-tab.png). Please, untick the checkbox and save the changes.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Reset button – “are you sure”’ is closed to new replies.