Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form reset() Override #36

Open
thehabes opened this issue Dec 4, 2019 · 0 comments
Open

Form reset() Override #36

thehabes opened this issue Dec 4, 2019 · 0 comments
Labels
enhancement New feature or request OSS An OSS developer task

Comments

@thehabes
Copy link
Member

thehabes commented Dec 4, 2019

When DEER needs to reset a form, it really means

LR.utils.scrubForm = function(form){
    form.removeAttribute("deer-id")
    form.removeAttribute("deer-source")
    form.querySelectorAll(LR.INPUTS.join(",")).forEach(i => {
        //Anything you need to ignore should go here
        if(i.getAttribute("type") !== "submit" && i.getAttribute("deer-key") !== "creator"){
            i.value = ""
            i.removeAttribute("deer-source")
            i.removeAttribute("deeer-id")
        }
    })
}

We should be able to put some flag on a form so it knows to do this upon submission so that this form will create a new object on the next submissions, not update the object it just made.

@thehabes thehabes added the enhancement New feature or request label Dec 4, 2019
@thehabes thehabes changed the title reset() Override Form reset() Override Dec 4, 2019
@thehabes thehabes added the OSS An OSS developer task label Sep 11, 2023
@github-project-automation github-project-automation bot moved this to New or Unassigned in OSS DEER Board Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OSS An OSS developer task
Projects
Status: New or Unassigned
Development

No branches or pull requests

1 participant