<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shimooka</author_name>
  <author_url>https://blog.hatena.ne.jp/shimooka/</author_url>
  <blog_title>Do You PHP はてブロ</blog_title>
  <blog_url>https://shimooka.hateblo.jp/</blog_url>
  <categories>
    <anon>PHP</anon>
    <anon>Symfony2</anon>
  </categories>
  <description>なんかタイトルの日本語がおかしい気もしますが。。。 忙しい人のための解決法超概要 デフォルトのフォームテーマ(form_div_layout.html.twig)では、choice_widgetブロック内でexpandedの場合に改めてform_widget関数を呼び出しているが属性情報を引き継いでいないため、ラジオボタンとチェックボックスに属性を直接付けることができない。なので、このようなカスタムフォームテーマを作ってテンプレートに適用する必要がある。 発端 Symfony2のFormTypeで、radioボタンの属性ってどうやって付ければ良いんだろう？twig側のform_widget関数…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshimooka.hateblo.jp%2Fentry%2F20120726%2F1343280157&quot; title=&quot;Symfony2のFormTypeでラジオボタンの属性を付ける - Do You PHP はてブロ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-07-26 14:22:37</published>
  <title>Symfony2のFormTypeでラジオボタンの属性を付ける</title>
  <type>rich</type>
  <url>https://shimooka.hateblo.jp/entry/20120726/1343280157</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
