Git Product home page Git Product logo

Comments (5)

horprogs avatar horprogs commented on May 25, 2024

Hi! Are you sure you use the correct form selector? Also it makes sense to prevent default submitting form, I guess it could be a reason of your issue:

.onSuccess((ev) => {
  ev.preventDefault();
  const form = document.querySelector("#basic-validation-form");
  let formData = new FormData(form);
  console.log(formData);
});

Check it out in this example: https://codesandbox.io/s/elastic-lalande-2bxjj?file=/index.html

from just-validate.

maxdenaro avatar maxdenaro commented on May 25, 2024

Hi! Yeah, selector is correct, but it doesnt work.

.onSuccess((ev) => {
    ev.preventDefault();
    const form1 = document.querySelector(".form");
    let formData = new FormData(form1);
    console.log(formData);
    console.log('Validation passes and form submitted', ev);

    console.log(...formData);

    for (var pair of formData.entries()) {
        console.log(pair[0]+ ', ' + pair[1]);
    }
  });

in the old version, with this output, or if using a normal event submit, everything is displayed in the console, and ends up in $_POST in PHP, but in the new version of Just Validate formData is empty.

formData filled only if you manually use the method append().

from just-validate.

maxdenaro avatar maxdenaro commented on May 25, 2024

my working code on old version - https://github.com/maxdenaro/maxgraph-youtube-source/tree/master/UI-%D0%BA%D0%BE%D0%BC%D0%BF%D0%BE%D0%BD%D0%B5%D0%BD%D1%82%D1%8B%20%E2%84%9613.%20%D0%92%D0%B0%D0%BB%D0%B8%D0%B4%D0%B0%D1%86%D0%B8%D1%8F%20%D0%B8%20%D0%BE%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%BA%D0%B0%20%D1%84%D0%BE%D1%80%D0%BC%D1%8B%20%D0%BD%D0%B0%20%D0%BF%D0%BE%D1%87%D1%82%D1%83%20%D0%B2%202022

from just-validate.

horprogs avatar horprogs commented on May 25, 2024

okay, I see, let me check

from just-validate.

horprogs avatar horprogs commented on May 25, 2024

Thanks for the great catch, was fixed in 3.3.2

from just-validate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.