Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Massive Form Problem

form

Solved by Michael Gollmer View solution

Started by Michael Gollmer 9 years ago · 2 replies · 691 views
9 years ago

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

last edited 11/08/17 by Michael Gollmer
9 years ago

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

👍 1
9 years ago Solution

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

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1138 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 135 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 110 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 129 7 months ago