From fe330825785300fe67cd304591df0ee4e027618c Mon Sep 17 00:00:00 2001 From: Rafael Dohms Date: Fri, 13 Jun 2014 15:29:44 +0200 Subject: [PATCH] Fixing placeholder application in inline forms The current code triggers `label => false` in `inline` forms to use `name|humanize` as the placeholder. This is wrong and if label is set explicitly to `false` it should trigger no placeholder. This fix adds the extra check to avoid this behavior. --- Resources/views/Form/bootstrap.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/views/Form/bootstrap.html.twig b/Resources/views/Form/bootstrap.html.twig index ff403d3..75ff539 100644 --- a/Resources/views/Form/bootstrap.html.twig +++ b/Resources/views/Form/bootstrap.html.twig @@ -37,7 +37,7 @@ {% set type = type|default('text') %} {% set attr = attr|merge({ 'class': (attr.class|default('') ~ ' form-control')|trim }) %} - {% if style == 'inline' and (attr.placeholder is not defined or attr.placeholder is empty) %} + {% if style == 'inline' and (attr.placeholder is not defined or attr.placeholder is empty) and label != false %} {% if label is empty %} {% set attr = attr|merge({ 'placeholder': name|humanize }) %} {% else %}