FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19403&edit=1

ID: 19403
Updated by: borz_off@cs.msu.su
Reported By: loki_angel at mail dot ru
Summary: getValue() returns wrong technical field
Status: Open
-Type: Bug
+Type: Feature/Change Request
Package: HTML_QuickForm2
Package Version: 2.0.0beta2
PHP Version: 5.4.1
Roadmap Versions:
New Comment:

-Type: Bug
+Type: Feature/Change Request
It is a feature request rather than a bug report, we didn't promise to
strip these fields. We do similar stuff in Controller::getValue(),
though, so will probably add a means to strip these in
QuickForm2::getValue(), too.


Previous Comments:
------------------------------------------------------------------------

[2012-04-28 12:03:47] loki

Description:
------------
getValue() returns wrong technical field

Test script:
---------------
<?php

require_once 'HTML/QuickForm2.php';
require_once 'HTML/QuickForm2/Renderer.php';

$form = new HTML_QuickForm2('elements');
$form->addElement('hidden', 'test', null);
$form->addElement('submit');

$renderer = HTML_QuickForm2_Renderer::factory('default');
$form->render($renderer);

var_dump($form->getValue());

echo $renderer;

Expected result:
----------------
array
'test' => string '' (length=0)

Actual result:
--------------
array
'_qf__elements' => string '' (length=0)
'test' => string '' (length=0)

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMay 2, '12 at 6:29a
activeMay 2, '12 at 6:29a
posts1
users1
websitepear.php.net

1 user in discussion

Borz_off: 1 post

People

Translate

site design / logo © 2022 Grokbase