Answer the question
In order to leave comments, you need to log in
Form element decorators and javascript in ZF?
Tell me, how to correctly add JS code to form decorators in ZF? I need to load TinyMCE to a text input field and add validation to other fields using JavaScript. I think it's right to do this using a decorator, but then it's not clear where the js files will be added to the page (in theory, they should be added to the header). How to write such a decorator?
Answer the question
In order to leave comments, you need to log in
the simplest option is to always connect all js files (on the product they are all compressed into 1 file), in ZF specify the class name to the input on which you need to hang TinyMCE and in js hang your plugin on this class
decorator class: pastebin.com/U4nyWyhS
partial view file - pastebin.com/TaDDyWXj
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question