Adding a label to a symfony 2 form field

I'm trying to modify a piece of code that generates an input field using the Symfony 2 framework. The thing he creates the field with a default label equals to the name id of the field, in this case; "amount".

//++++++++++ descrizione
echo $view['form'] -> row($form["amount"], array(
    "widgetArgs" => array(
        "attr" => array(
            'class' => 'input-small tooltipRight', 
            'id' => "gift_amount"
            "translation_domain" =>"brand"

   "labelArgs" => array(
        "label_attr" => array(
            'class' => 'control-label', 
        )) ,"rowType"=>2

How can i edit this to make it show a custom label?


You have to add the label properties:

echo $view['form']->row($form["amount"], array(
    'widgetArgs' => array(
        "attr" => array(
            'class' => 'input-small tooltipRight', 
            'id' => "gift_amount"
            'translation_domain' =>'brand'
     'label'  => 'My ammount',

Need Your Help

Wicket TreeTable remove nodes icon

java tree treeview wicket

Is there a way to remove the notes icon from the TreeTable component? I've searched in a lot of places but I can't find a way to remove it.

What to do with SVG so it can be resized using Javascript?

javascript svg

Let's say I loaded SVG, displayed it in browser, and so far it is OK.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.