Massive Form Problem

Hello there,

I build myself an ajax form and on my local machine evertything works fine. I get the message and everythin is displayed fine.

On my staging machine it causes an error. He renders the whole page wich was defined in the former set “display” parameter. I had the error before but i solved it by cleaning out the “display” parameter in the MD file. I checked the file on my machine and everythings seems alright. Anybody else experienced this before ? Is it some kind of htaccess bug, or something?

Kind Regards,
Michael

UPDATE: He always try to show “thankyou” regardless of it’s existence or if it’s configured in yaml

Did you resolve this? I thought i saw something related to the fact that the form name was missing?

1 Like

Hey there,

yeah sorry forgot to reply here. I did resolve this. The problem was the result of a double definition of a form. I thought forms were pagebound. But as I learned yesterday, Forms are considered globally durign the creation process.

I created to Forms with the same name. One of them was still in development and not ready, the other one was finished and ready to deploy. During the tests on my staging system, the ajax request for the form submit always considered the wrong form. So that the result of the test looked horrible (rendered whole page in lightcase).

After realizing the global dependencies of the form handling. I deleted the “work-in-progress” Version of the Form on the other Page and simply included it via twig. Here is the link to the ressource:

https://learn.getgrav.org/forms/forms#displaying-forms-from-twig

Kind Regards,
Michael

1 Like