<p>I'm constructing a simple form in ERB but the HTML produced by the text_field tag makes the <em>for</em> attribute in the label tag invalid.</p>

<pre><code>&lt;div&gt;
  &lt;p&gt;&lt;%= label_tag "email[name]", "Name" %&gt;&lt;/p&gt;
  &lt;%= text_field :email, :name, :class =&gt; "text_field" %&gt;
&lt;/div&gt;
</code></pre>

<p>Produces the HTML</p>

<pre><code>&lt;div&gt;
  &lt;p&gt;&lt;label for="email[name]"&gt;Name&lt;/label&gt;&lt;/p&gt;
  &lt;input class="text_field" id="email_name" name="email[name]" size="30" type="text" /&gt;
&lt;/div&gt;
</code></pre>

<p>Which results in the error </p>

<blockquote>
  <p>character "[" is not allowed in the
  value of attribute "for".</p>
</blockquote>

<p>How do I generate the text with without the nested parameter name email[name] to change the label tag <em>for</em> attribute? Is there an alternative approach that produces valid HTML?</p>

Never having used sas, what I might try is something like:
```
```
echo <insert sas code here> | sas --execute-file -
```
```
Oftentimes applications will let you specify '-' as a file to have it read from STDIN. And 'echo' just prints its arguments out, and the | connects them together.