Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.13

Bug #1381 dynamic form elements can not be conditional tag?
Submitted: 2004-05-11 09:33 UTC
From: jeroenl at zwolnet dot com Assigned: alan_k
Status: Closed Package: HTML_Template_Flexy
PHP Version: 4.3.4 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-05-11 09:33 UTC] jeroenl at zwolnet dot com
Description: ------------ Not sure if this is by design, but dynamic form elements seem not to work as conditional tag, e.g.: <select flexy:if="dynElements[filter_period]" name="filter_period"></select> Results in an empty select (dynElements[filter_period] is null). While next workaround works oke: {if:dynElements[filter_period]} <select name="filter_period"></select> {end:} Can dynamic form elements not be used as conditional tag? (I guess you might get problems with loops etc.) Keep up the great work! I start to see more and more power in Flexy ... The lack of doc makes it sometimes hard to figure out if something is possible and how to do it, but when you do: you'll find out the power is amazing! B.t.w. the included tests are great help for this. Greetings, Jeroen.

Comments

 [2004-05-12 04:57 UTC] alan_k
I'm not sure that's fixable in any way, other than the complier raising an error.. "You may not use flexy conditionals and dynamic elements in the same tag"
 [2004-05-13 06:42 UTC] jeroenl at zwolnet dot com
Thanx, so not possible. That explains a lot. Since it might not be clear to (some/new) users that Flexy handles some tags (forms and it elements [only?]) different from others, it might be a suggestion to reverse the logic from being default "dynamic" for form(-elements) to having to switch that on. Resulting in Flexy normally handling all tags the same way. And only if you force a (form)element to be dynamic, this (and everything it contains) are handled dynamicly. E.g. with something like "flexy:dynamic". Raising an compiling error when mixing both makes sense to me. Greetings, Jeroen.
 [2004-06-10 03:57 UTC] alan_k
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.