--TEST-- Template Test: forms.html --FILE-- 'hello', 'test12a' => 'hello', 'test12ab' => 'hello', 'fred' => 'hello', 'aaa1' => 'hello', 'List' => '2000', 'testingxhtml' => 'checked', )); $elements["testingcheckbox"] = new HTML_Template_Flexy_Element; $elements["testingcheckbox"]->setValue(123); #bug6058 $elements['payment_1_type'] = new HTML_Template_Flexy_Element; $elements['payment_1_type']->attributes['flexy:xhtml'] = true; $elements['payment_1_type']->setValue('cq'); // this exhibits unusual behavior, but is not really a bug // actually the correct usage is to use '' where 'input' is. $elements['payment_2_type'] = new HTML_Template_Flexy_Element('input', array('flexy:xhtml' => true)); $elements['payment_2_type']->setValue('cq'); compilefile('forms.html', array(), array( 'show_elements' => true ), $elements ); --EXPECTF-- ===Compiling forms.html=== ===Compiled file: forms.html===

Form Not Parsed

Parsed

elements['test']->toHtmlnoClose();?> Inputelements['test123']->toHtml();?> Checkbox elements['test123a']->toHtml();?> Hidden elements['test123ab']->toHtml();?> elements['fred']->toHtml();?> elements['aaa1']->toHtml();?> elements['aaa3']->toHtml();?> elements['opt_1']; $element = $this->mergeElement($element,$this->elements['opt[]']); echo $element->toHtml();?> elements['opt_2']; $element = $this->mergeElement($element,$this->elements['opt[]']); echo $element->toHtml();?> elements['opt_3']; $element = $this->mergeElement($element,$this->elements['opt[]']); echo $element->toHtml();?> elements['List']->toHtml();?> elements['_submit[4]']->toHtml();?> elements['_submit[5]']->toHtml();?> elements['testupload']->toHtml();?> #bug bug6058
elements['1']; $element = $this->mergeElement($element,$this->elements['payment_1_type']); echo $element->toHtml();?> Credit card
elements['2']; $element = $this->mergeElement($element,$this->elements['payment_1_type']); echo $element->toHtml();?> Cheque
elements['3']; $element = $this->mergeElement($element,$this->elements['payment_2_type']); echo $element->toHtml();?> Credit card
elements['4']; $element = $this->mergeElement($element,$this->elements['payment_2_type']); echo $element->toHtml();?> Cheque elements['picture']->toHtml();?>

Bug 1120:

elements['testing']->toHtml();?> elements['_submit[2]']->toHtml();?>
elements['testing2']->attributes['value'])) { $this->elements['testing2']->attributes['value'] = ''; $this->elements['testing2']->attributes['value'] .= htmlspecialchars($t->somevalue); } $_attributes_used = array('value'); echo $this->elements['testing2']->toHtml(); if (isset($_attributes_used)) { foreach($_attributes_used as $_a) { unset($this->elements['testing2']->attributes[$_a]); }} ?> elements['_submit[1]']->toHtml();?>

Bug 1275 XHTML output

elements['testingxhtml']->toHtml();?> elements['xhtmllisttest']->toHtml();?>

Bug 4005 Checkboxes

elements['testingcheckbox']->toHtml();?> elements['test_mix']->attributes['action'])) { $this->elements['test_mix']->attributes['action'] = ''; $this->elements['test_mix']->attributes['action'] .= htmlspecialchars($t->someurl); } $_attributes_used = array('action'); echo $this->elements['test_mix']->toHtmlnoClose(); if (isset($_attributes_used)) { foreach($_attributes_used as $_a) { unset($this->elements['test_mix']->attributes[$_a]); }} ?> elements['testing5']->attributes['value'])) { $this->elements['testing5']->attributes['value'] = ''; $this->elements['testing5']->attributes['value'] .= htmlspecialchars($t->somevalue); } $_attributes_used = array('value'); echo $this->elements['testing5']->toHtml(); if (isset($_attributes_used)) { foreach($_attributes_used as $_a) { unset($this->elements['testing5']->attributes[$_a]); }} ?> elements['_submit[3]']->toHtml();?> Array ( [test] => html_template_flexy_element Object ( [tag] => form [attributes] => Array ( [name] => test ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [test123] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [name] => test123 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [test123a] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [name] => test123a [id] => test123ab [type] => checkbox [checked] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [test123ab] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [name] => test123ab [type] => hidden [value] => 123 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [fred] => html_template_flexy_element Object ( [tag] => textarea [attributes] => Array ( [name] => fred ) [children] => Array ( [0] => some text ) [override] => [prefix] => [suffix] => [value] => ) [aaa1] => html_template_flexy_element Object ( [tag] => select [attributes] => Array ( [name] => aaa1 ) [children] => Array ( [0] => [1] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( ) [children] => Array ( [0] => aa ) [override] => [prefix] => [suffix] => [value] => ) [2] => [3] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( [selected] => 1 ) [children] => Array ( [0] => bb ) [override] => [prefix] => [suffix] => [value] => ) [4] => [5] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( ) [children] => Array ( [0] => cc ) [override] => [prefix] => [suffix] => [value] => ) [6] => ) [override] => [prefix] => [suffix] => [value] => ) [aaa3] => html_template_flexy_element Object ( [tag] => select [attributes] => Array ( [name] => aaa3 ) [children] => Array ( [0] => [1] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( ) [children] => Array ( [0] => aa ) [override] => [prefix] => [suffix] => [value] => ) [2] => [3] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( [selected] => 1 ) [children] => Array ( [0] => bb ) [override] => [prefix] => [suffix] => [value] => ) [4] => [5] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( ) [children] => Array ( [0] => cc ) [override] => [prefix] => [suffix] => [value] => ) [6] => ) [override] => [prefix] => [suffix] => [value] => ) [opt_1] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [id] => opt_1 [type] => checkbox [name] => opt[] [value] => 1 [/] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [opt_2] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [id] => opt_2 [type] => checkbox [name] => opt[] [value] => 2 [/] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [opt_3] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [id] => opt_3 [type] => checkbox [name] => opt[] [value] => 3 [/] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [List] => html_template_flexy_element Object ( [tag] => select [attributes] => Array ( [name] => List ) [children] => Array ( [0] => [1] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( [value] => 2000 ) [children] => Array ( [0] => 2000 ) [override] => [prefix] => [suffix] => [value] => ) [2] => [3] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( [value] => 2001 ) [children] => Array ( [0] => 2001 ) [override] => [prefix] => [suffix] => [value] => ) [4] => [5] => html_template_flexy_element Object ( [tag] => option [attributes] => Array ( [value] => 2002 ) [children] => Array ( [0] => 2002 ) [override] => [prefix] => [suffix] => [value] => ) [6] => ) [override] => [prefix] => [suffix] => [value] => ) [_submit[4]] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => submit [name] => _submit[4] [value] => Next >> ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [_submit[5]] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => submit [name] => _submit[5] [value] => Next >> ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [testupload] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => file [name] => testupload ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [payment_1_type] => [1] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => radio [name] => payment_1_type [id] => 1 [value] => cc [/] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [2] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => radio [name] => payment_1_type [id] => 2 [value] => cq [/] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [payment_2_type] => [3] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => radio [name] => payment_2_type [id] => 3 [value] => cc [/] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [4] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => radio [name] => payment_2_type [id] => 4 [value] => cq [/] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [picture] => html_template_flexy_element Object ( [tag] => img [attributes] => Array ( [name] => picture [id] => picture ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [testing] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [name] => testing [value] => test ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [_submit[2]] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => submit [value] => x [name] => _submit[2] ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [testing2] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [name] => testing2 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [_submit[1]] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => submit [name] => _submit[1] ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [testingxhtml] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => checkbox [name] => testingxhtml [checked] => 1 [flexy:xhtml] => 1 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [xhtmllisttest] => html_template_flexy_element Object ( [tag] => select [attributes] => Array ( [name] => xhtmllisttest [flexy:xhtml] => 1 ) [children] => Array ( [0] => ) [override] => [prefix] => [suffix] => [value] => ) [testingcheckbox] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => checkbox [name] => testingcheckbox [value] => 123 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [test_mix] => html_template_flexy_element Object ( [tag] => form [attributes] => Array ( [name] => test_mix ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [testing5] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [name] => testing5 ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) [_submit[3]] => html_template_flexy_element Object ( [tag] => input [attributes] => Array ( [type] => submit [name] => _submit[3] ) [children] => Array ( ) [override] => [prefix] => [suffix] => [value] => ) ) ===With data file: forms.html===

Form Not Parsed

Parsed

Input Checkbox Hidden #bug bug6058
Credit card
Cheque
Credit card
Cheque

Bug 1120:

Bug 1275 XHTML output

Bug 4005 Checkboxes