Git Product home page Git Product logo

Comments (4)

skydiver avatar skydiver commented on July 22, 2024

Hello @rickgoemans, a few questions:

  1. are you using jquery?
  2. same problem using "Generic AJAX Form" component?
  3. this problem still happens on fresh october install?

from october-plugin-forms.

rickgoemans avatar rickgoemans commented on July 22, 2024

I found the reason behind the error.

I try to load the component within a partial. And apparently your plugin only checks the components of the page.

You can try to reproduce it yourself by doing this:

  1. Make a page called (example /contact) and place the empty form component on that page called "contactForm". It will work just fine.
  2. Move the form code from the page you just created to a partial called "contact" and load that partial into you contact page. If you refer to data-request="{{ contactForm }}:onFormSubmit inside the partial it still works since you didn't remove the component on the page.
  3. Move the component on the page to the partial. The error get triggered.

In short, the plugin doesn't fully support partials since it only checks for components on the page. A dirty solution would be added the component on each page where the partial with that form is loaded, but this requires a lot of editing if a single change is made. Another dirty solution might be adding the component to the layout file but I haven't tested it yet.

from october-plugin-forms.

skydiver avatar skydiver commented on July 22, 2024

There is some limitation when using components from partials.

Check out this comment octobercms/october#750 (comment)

You're right, components needs to be added to the page or layout and call it from partial (this looks like the "official" solution)

from october-plugin-forms.

kiretutu avatar kiretutu commented on July 22, 2024

Talking about plugin magic something :??
For form ajax ?
If yes, someone tell me how use him...

from october-plugin-forms.

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.