Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2669

Tapestry Form.js running on non Tapestry forms

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.7.2, 5.6.4
    • None
    • None

    Description

      There is an issue when a non Tapestry form is being submitted, the Javascript in Form.js is triggered, specifically, 

       

      dom.onDocument("click", "input[type=submit], input[type=image]", function() { setSubmittingHidden(dom(this.element.form), this); });
      

       

      This is then causing a t:submit parameter to be added to the request query parameters via, 

       

      setSubmittingHidden
      
       hidden = form.findFirst("[name='t:submit']");
            if (!hidden) {
              firstHidden = form.findFirst("input[type=hidden]");
              hidden = dom.create("input", {
                type: "hidden",
                name: "t:submit"
              });
              firstHidden.insertBefore(hidden);
            }
            name = isCancel ? "cancel" : submitter.element.name;
            hidden.value("[\"" + submitter.element.id + "\",\"" + name + "\"]");
      

      Attachments

        Activity

          People

            thiagohp Thiago Henrique De Paula Figueiredo
            Nakories Alex Craddock
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: