formtools / core

The Form Tools Core.
https://formtools.org
207 stars 78 forks source link

Typo in Adding something to a specific form page #612

Closed radasys closed 5 years ago

radasys commented 5 years ago

Thank you so much for this software!

Using code in Adding something to a specific form page, under Specifying a form or View, I have noticed that the equal after the && clause uses only one = symbol.

When we update the template using that syntax, Apache logs an issue like this:

PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "eval:{{navigation}} <h2>{{$page_name}}</h2> ..." on line 5 "{{(if $current_page == 1 && $form_id = 5)}}" - Unexpected " " <-- \n thrown in /var/www/html/formtools/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 5

When we change the = to ==, the issue is solved. Maybe updating the documentation would be useful for other users...

Thanks!

benkeen commented 5 years ago

Ooh, thanks! I'll fix this right now.

benkeen commented 5 years ago

Fixed.