Topics

Info

This is a non standard input type. It has no actual type. Use it when you need some information on your form instead of actual input. Set any HTML you like. Use labels to avoid label printed next to this field.

Usage example  

<?php
$form = new \Ip\Form();
$form->addField(new \Ip\Form\Field\Info(
    array(
        'label' => 'Something here',
        'html' => 'Any HTML you like'        
    )
));
echo $form->render();

 Removing the label

<?php
$form = new \Ip\Form();
$form->addField(new \Ip\Form\Field\Info(
    array(
        'label' => 'Something here',
        'html' => 'Any HTML you like'        
        'layout' => \Ip\Form\Field::LAYOUT_NO_LABEL // or \Ip\Form\Field::LAYOUT_BLANK
    )
));
echo $form->render();
comments powered by Disqus