-- Menno Luiten <[EMAIL PROTECTED]> wrote (on Monday, 28 July 2008, 09:19 PM +0200): > I’m working on a collection of Form Decorators and ViewHelper’s which should > enable Ext.JS powered Forms, TabPanels, etc. However, 1 point I’ve come across > is the naming of elements in subforms. Let’s say I have a FormPanel (basicly > a > form tag) that contains a TabPanel with 2 tabs (the SubForms, named > ‘login_tab’ > and ‘forgot_password’), which in turn contain the elements. The naming of the > elements in the SubForm to validate it server-side is quite ambiguous. For > example, the Form::isValid() function checks the $_POST[“login_tab”] > [“element_name”], but if $_POST[“login_tab”] does not exist, it will check > $_POST[“element_name”] anyway. > > My question: should I name my elements like <input name=”login_tab > [element_name]”> or will <input name=”element_name”> suffice?
<snip> > PS: Since ZF has a Dojo library, is it any use to submit a proposal if my > implementation turns out to be useful? Or will it be rejected due to the > previously mentioned Dojo engagement? I'm going to answer both questions, but start with this one. First, yes, we'll accept proposals for alternate JS toolkits. However, they will be part of the Extras (ZendX) library, and not part of the standard library, and we will not ship the JS library associated with it. There is already somebody working on a jQuery proposal (and I've been helping him out with some pointers). One goal of the Dojo integration was to have it serve as a blueprint for other integrations. As for your question: take a look at how I did the various containers for the Dojo. Dojo has a variety of layout containers as well. I created decorators for these, and you then attach them to sub forms or display groups. The "advanced" example I provide in the manual has each sub form decorated with a content pane, and then decorates the form with a tab container to render the four sub forms as four tabs. This ensures that your namespacing works correctly for elements, and also ensures users don't have to jump through too many hoops to utilize these features. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
