No problem, we all have them ;). Matthew Weier O'Phinney has just given a really good webinar on just this topic, it takes a bit to wrap your head around, heres a link to the recording:
http://www.zend.com/en/resources/webinars/framework Good luck :) 2009/12/18 Mike A <[email protected]> > > On 18 Dec 2009 at 20:42, Daniel Latter wrote: > > > > > Hi, > > > > What do you mean " many ids with productid produces validation error "? It > > is left upto > > the coder to set a unique id for each element? What are you trying to do, > > may be it wil shed more > > light? > > > > Also, if im not mistaken both the examples you refer to are the same? are > > you trying to > > dosomthing like this: > > > > .. id="producid_11" .. ? > > Yes - my bad. I used Nabble for the first post, it took out some of my text. > Then my brain > went daft on the required example. > > By validation I'm referring to markup. As sson as I read your reply I > realised I had not passed > id value to the form. Been at this too long today - 14 hours :( > > Also, trying to get pretty markup via decorator - it's driving me nuts! > > Many thanks Dan > > > Thanks > > Dan > > > > > > 2009/12/18 Mike A <[email protected]> > > Apologies - my previous post did not format correctly, so I repeat. > > > > When constructing a form element I use this... > > > > $this->addElement('hidden', 'productId', array( > > 'decorators' => array(array('ViewHelper'), > > array('HtmlTag', array('tag' => 'p')), > > ), > > )); > > > > which formats as html (precisely) this way... > > > > <p> > > <input type="hidden" name="productId" value="11" id="productId" /></p> > > > > > > There are two problems with this. First, many input ids with "productId" > > produces a validation > > error. Second, mark-up format is wrong. What must I do to produce this > > (with value added to > > id)... > > > > <p> > > <input type="hidden" name="productId" value="11" id="productId" /> > > </p> > > > > TIA... > > > > Mike > > > > > >
