Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZF] Zend_Form <fieldset> dziedziczy wszystkie atrybuty po <form>
NoiseMc
post
Post #1





Grupa: Zarejestrowani
Postów: 398
Pomógł: 10
Dołączył: 24.11.2004
Skąd: Łódź

Ostrzeżenie: (0%)
-----


http://framework.zend.com/issues/browse/ZF-2981

Ktos juz sobie moze z tym poradzil?
Poki co dostaje:
  1. <form name="contestform" id="contest-form" enctype="application/x-www-form-urlencoded" action="/free-parking" method="post"><fieldset id="contest-form" action="/free-parking">


Uzywajac:
  1. <?php
  2. $this->setName ('contest-form');
  3. $this->setAttrib ('id', 'contest-form');
  4.  
  5. $this->clearDecorators ();
  6. $this->addDecorator ('FormElements')
  7.  ->addDecorator ('Fieldset')->setLegend ('asda')
  8.  ->addDecorator ('Form');
  9. ?>


Co proponujecie?

No nic ... z Zend_Form_Decorator_Fieldset usunalem zakomentowane linijki:
  1. <?php
  2. public function getOptions()
  3. { 
  4. $options = parent::getOptions();
  5. //if (null !== ($element = $this->getElement())) {
  6. // $attribs = $element->getAttribs();
  7. // $options = array_merge($options, $attribs);
  8. // $this->setOptions($options);
  9. //}
  10. return $options;
  11. }
  12. ?>

Ze niby Fieldset dekoruje Form ale wydaje mi sie ze nie powinien przejmowac i wyswietlac jego atrybutow.
Ktos ... jakies pomysly ?

Ten post edytował NoiseMc 4.04.2008, 18:53:36
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 08:36