Using Ajax in partials files in WinterCMS

84 views Asked by At

In WinterCMS I have set up a component that will get an input from the user and insert the result into the database. I have this input set up in a partial file. Problem is the Ajax form doesn't work in my partial file, I get the error "AJAX handler 'onSave' was not found." I know my component works fine as I have used it in a normal page and a layout, it managed to insert into the database fine. Is there a reason I can't use the Ajax in my partial? and is there a possible work around?

I've tested the component on pages and layouts in my project to test if the Ajax works and it has. I've included the Ajax framework scripts into my partials file but still get the error.

0

There are 0 answers