Closed truckee closed 2 years ago
@truckee Thanks for reporting this bug. The form extension is not yet completed. I'll try to look into this issue this weekend.
As an aside: I'm successfully using the default Smarty extension .tpl while in the Netbeans IDE.
Yes, I'm keeping support for both smarty
and tpl
file extensions but beware that 3rd-party plugins like Assetic won't work with non-smarty
file extensions.
Thanks for all your work on this.
I would love to see Smarty validation in Symfony, but I suspect that is a far more daunting task. I've spent the past couple of days trying without success to validate a form that, with a custom Smarty validator plugin, I could do in less than an hour. Smarty validation considers request variables rather than entity properties (approximately equal to database table fields). There appears to be no straightforward method for validating a combination of a mapped and an unmapped field. Oh well.
George
@truckee By Smarty validation are you referring to this: http://www.phpinsider.com/php/code/SmartyValidate/?
I would like to deliver a stable/completed version of SmartyBundle with full Symfony forms support. If you are interested in contributing with code please switch to form-extension
branch and send PR. We can discuss this feature over here or in IRC freenode.org channels #noiselabs, #smarty or #symfony (just "ping" me).
I wish I was sufficiently competent to contribute! Tom Lahey of Lahey Fortran once told me there are programmers and there are code writers. Programmers provide elegant solutions. Code writers fumble around until they find something that works. I'm lucky enough to occasionally stumble into the class of code writers.
George
I guess Jeff Atwood also agrees with Tom Lahey.
Code is not the only way to contribute so I'm always listening for suggestions, advices, bug reports, beta-testing. You're always welcome to contribute in one or all of these ways.
Then sign me up. Just so you know: I'm a retired alpha-geek who writes small web-hosted database applications for local non-profit organizations as a hobby. So I've got a lot more time than I have skill. I'm more than happy to spend time on this - I really like Smarty, Symfony I'm reserving judgment.
George
Welcome aboard :)
FYI, this bundle is also being used in PPI Framework 2 and it may be used as a standalone library to extend Smarty capabilities (although some more work needs to be done in this field).
Disclaimer: I'm a PPI developer.
PPI is a meta-framework built upon Symfony2 and ZendFramework2 and it's purpose is to pick the best components of each providing a simpler usage for rapid deployment of web applications. It comes integrated with Twitter Bootstrap and jQuery along with other javascript components. If you feel the need to try it drop me a line.
@noisebleed - how about that form extension? any chance for progress?
@ahilles107 Sadly I'm not using Symfony Forms in my webapps so I lack the motivation and time to finish this extension. But I can mark it as a priority and try to come up with something functional. Are you using Sf2 Forms? If so, can I query you once and awhile for suggestions, testing?
Yes, i'm using Symfony2 Forms - but i'm not a big expert from smarty;) If you will have a question - ask ;)
How i can help with that issue?
Hello @ahilles107. Thank you very much for your availability. Once I get back to the form branch again I'll let you know. Take care.
Hey again, how about that form extension? Can you check that issue and tell me what's wrong and how i can help?
Hey, let me check my free time between today and Monday and will get back to you.
I'm still here and waiting.
We have two missing variables in this FormExtension.php file:
$this->resources
$this->templates
when i should start?
@ahilles107 Do you use IRC? Can you come over to #smarty or #noiselabs and ping me there.
I got to this issue, too... I just don't get the slightest idea, what the missing properties are supposed to do... I'll try to figure out... Maybe you could tell me, when you're available in IRC...
@WolleTD I'm currently working on this, using Twig and PHP implementations from Symfony-2.2 as inspiration. The form rendering is a bit complex and I don't have much free time these days so I'm taking longer than expected. Hope to give it another push this weekend.
The form component has evolved from 2.1 to 2.2 and there already changes on 2.3. Since 2.3 is not yet stable I'm using Forms-2.2 when looking for examples. Next task is to convert the Twig template with form blocks to a Smarty template with functions.
@WolleTD If you see me on #smarty, #symfony or #noiselabs IRC channels just highlight my nick.
any progress with that?
Hello @ahilles107, I'm currently on vacations, I'll be back on the 23rd. See you then.
Hi guys, somebody found a solution to this problem??
Forms support has been dropped in the main branch and is currently out of scope for the next release. Closing.
In v2.1.3, an attempt to create a form using a Smarty template and the symfony form object, the line
{form_widget form=$form}
results in the following: "Notice: Undefined property: NoiseLabs\Bundle\SmartyBundle\Extension\FormExtension::$resources in G:\Documents\workspace\sym\vendor\noiselabs\smarty-bundle\NoiseLabs\Bundle\SmartyBundle\Extension\FormExtension.php line 325" in "G:\Documents\workspace\sym\src\Mana\AdminBundle/Resources/views/Client/client_addnew.html.tpl"Without the widget line the template appears as expected.
As an aside: I'm successfully using the default Smarty extension .tpl while in the Netbeans IDE.