'Twas brillig, and Matthew Weier O'Phinney at 02/02/09 23:07 did gyre and gimble:
-- drj201 <[email protected]> wrote
(on Monday, 02 February 2009, 02:05 PM -0800):
I have a Zend_Form object which uses the GET method of submission. Creating
a new instance of my zend form and displaying it in the view works fine. By
default, on submission of the form the browser is directed to the set action
in my Zend_Form and the GET params are set to include those elements from my
form such as:

http://www.example.com/search?index=news&submit=submit

Question 1) Can I specify which GET params to pass to my form action? For
example the "submit=submit" is not needed and is included by default because
of the 'submit' element specified in my Zend_Form.

No -- HTML forms submit all elements in the form (with the exception of
unchecked checkboxes, for some reason).

Yeah I asked the same question on IRC the other day too... it's very annoying having to name your submit button which in turn causes it to be submitted with the form.

Could we perhaps have some kind of logic in Zend form that suppresses the name= attribute from being generated?

I'd imagine a $element->noSubmit(true); or ->unnamed(true) or whatever would work... but that said I've not delved into the Zend Form code much so I don't really know the consequences.

Certainly, it's something that bugs me, but not so much I loose sleep over :)

Col





--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

Reply via email to