Skip to content

Reset form when back button is clicked #1

@Guido07111975

Description

@Guido07111975

Great work, really like the plugin. Hopefully it gets listed in the CP Plugin Directory at some point.

I notice you can re-submit the form again and again by clicking the back button of the browser.

I don't know whether or not this is the best solution to fix this, but you can consider resetting the form:

window.addEventListener("pageshow", function() {
	if(document.getElementById("my-form")) {
		document.getElementById("my-form").reset();
	}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions