terminal42 / contao-conditionalformfields

Display form fields conditionally in Contao Open Source CMS
MIT License
18 stars 12 forks source link

Problems when sending the form #36

Closed wschwaiger closed 4 years ago

wschwaiger commented 4 years ago

I am getting the following critical error when sending the form under C 4.4.47 with conditional form fields activated.

[2020-02-28 11:39:58] request.INFO: Matched route "contao_frontend". {"route":"contao_frontend","route_parameters":{"_token_check":true,"_controller":"Contao\CoreBundle\Controller\FrontendController::indexAction","_scope":"frontend","alias":"unverbindlich-anfragen","_route":"contao_frontend"},"request_uri":"https://www.christernhof.at/unverbindlich-anfragen.html","method":"POST"} [] [2020-02-28 11:39:58] security.INFO: Attempting SimplePreAuthentication. {"key":"frontend","authenticator":"Contao\CoreBundle\Security\ContaoAuthenticator"} [] [2020-02-28 11:39:59] app.CRITICAL: An exception occurred. {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Parse error: syntax error, unexpected '$arrPost' (T_VARIABLE) at /srv/www/stefan-geisler/public/christernhof/vendor/terminal42/contao-conditionalformfields/ConditionalFormFields.php(58) : eval()'d code:1)"} []

Toflar commented 4 years ago

Your condition seems to be invalid.

wschwaiger commented 4 years ago

after sending? seems odd. because when displaying the form everything is fine. here is a screenshot of my conditions. I have similar conditions on another instance and it is working smoothly.

Bildschirmfoto 2020-02-28 um 13 19 16

richardhj commented 4 years ago

Ist dies noch valid? So weit ich mich erinnere, sind die Klammern um die Bedingung wichtig.

Wenns immer noch nicht läuft:

Kannst du vor https://github.com/terminal42/contao-conditionalformfields/blob/302cc0c0abbd19a8c7e4ec2e5afee11f5d1a8c47/ConditionalFormFields.php#L241 mal folgendes schreiben:

var_dump($strCondition);exit;

und zurückmelden, was rauskommt?

richardhj commented 4 years ago

Bitte einfach das Ticket wieder öffnen, wenn das Problem noch besteht. Danke!