Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17496 программистов и 1877 роботов. Сейчас ищет 1731 программист ...

HTML_QuickForm_Renderer_Object

Вернуться к: Basic renderers

HTML_QuickForm_Renderer_Object

HTML_QuickForm_Renderer_Object – Object representation of the form

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] => 
                                )
                                
                             ...

                        )

                )
                
            ...

        )

)

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



Вернуться к: Basic renderers

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware