Why Do Play Framework Form Helpers Use 'Extra&

2019-06-03 10:09发布

Why do Play's Form Helpers generate the dl,dt, and dd tags? They seem unnecessary.

   <dl class="error" id="email_field">
        <dt><label for="email">Email:</label></dt>
        <dd><input type="text" name="email" id="email" value=""></dd>
        <dd class="error">This field is required!</dd>
        <dd class="error">Another error</dd>
        <dd class="info">Required</dd>
        <dd class="info">Another constraint</dd>
    </dl>

https://www.playframework.com/documentation/2.3.x/JavaFormHelpers

1条回答
做个烂人
2楼-- · 2019-06-03 10:58

Although Maxime confessed himself, remember that's just default helpers. If they were ie. just pure fields people would start to why it doesn't use some structure ;)

Besides all remember that Play allows you to create custom constructors easily which is perfectly showed in official documentation.

查看更多
登录 后发表回答