previousHTML_QuickForm_Renderer_Array::toArray() (Previous) (Next) constructor HTML_QuickForm_Renderer_Object::
HTML_QuickForm_Renderer_Object()
next

View this page in Last updated: Tue, 02 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

HTML_QuickForm_Renderer_Object

HTML_QuickForm_Renderer_Object – Object representation of the form

Description

This renderer does not output anything itself, it returns the form structure as an object. This object can later be used for generating the output. A usage example is available for this renderer and the Flexy template engine, look in docs/renderers directory.

The form object structure is similar to the following:

 
QuickformForm Object
(
    [frozen] => 
    [javascript] => 
    [attributes] =>  action="/object.php" method="post" name="form" id="form"
    [requirednote] => <span style="font-size:80%; color:#ff0000;">*</span><span style="font-size:80%;"> denotes required field</span>
    [hidden] => 
    [errors] => stdClass Object
        (
        )

    [elements] => Array
        (
            [0] => QuickformElement Object
                (
                    [name] => session
                    [value] => 1234567890
                    [type] => hidden
                    [frozen] => 
                    [label] => 
                    [required] => 
                    [error] => 
                    [style] => 
                    [html] => <input name="session" type="hidden" value="1234567890" />
                    [separator] => 
                    [elements] => 
                )
                
            ...

        )

    [sections] => Array
        (
            [0] => stdClass Object
                (
                    [header] => Personal Information
                    [elements] => Array
                        (
                            [0] => QuickformElement Object
                                (
                                    [name] => email
                                    [value] => 
                                    [type] => text
                                    [frozen] => 
                                    [label] => Your email:
                                    [required] => 1
                                    [error] => 
                                    [style] => 
                                    [html] => <input name="email" type="text" />
                                    [separator] => 
                                    [elements] => 
                                )
                                
                             ...

                        )

                )
                
            ...

        )

)

Tip

HTML_QuickForm::toObject() method uses the object renderer internally.

previousHTML_QuickForm_Renderer_Array::toArray() (Previous) (Next) constructor HTML_QuickForm_Renderer_Object::
HTML_QuickForm_Renderer_Object()
next

Download Documentation Last updated: Tue, 02 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.