I think @schools should be @school&nbsp; the form builder is looking for @school<br><br>Dave<br><br><div class="gmail_quote">On Thu, Apr 10, 2008 at 2:41 PM, BJ Clark &lt;<a href="mailto:bjclark@scidept.com">bjclark@scidept.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello All,<br>
<br>
We use a different custom form builder for our app, but I wanted to<br>
use facebooker&#39;s typeahead widget in side the other form builder.<br>
I don&#39;t know much about form builders, but I created a file in lib/<br>
doing this:<br>
<br>
<a href="http://pastie.caboo.se/178776" target="_blank">http://pastie.caboo.se/178776</a><br>
<br>
It works great, except that the id&#39;s and class names get messed up.<br>
Instead of school_name, I get nilClass_name.<br>
The other methods work fine however.<br>
<br>
Here&#39;s the form:<br>
&lt;h1&gt;New School&lt;/h1&gt;<br>
&lt;%= show_flash %&gt;<br>
&lt;% af_form_for :school, :url =&gt; schools_path, :html =&gt; {:method<br>
=&gt; :post } do |f| %&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;%= f.typeahead :name, @schools, &quot;name&quot;, &quot;name&quot; %&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;div class=&#39;label&#39;&gt;School Type&lt;/div&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;%= f.radio_button :type, &quot;College&quot;, :label =&gt; &quot;College/<br>
University&quot;, :span =&gt; 4, :last =&gt; true %&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;%= f.radio_button :type, &quot;HighSchool&quot;, :label =&gt; &quot;High<br>
School&quot;, :span =&gt; 4, :last =&gt; true %&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;%= f.hidden_field :nid %&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;%= f.submit &quot;Create School&quot; %&gt;<br>
&lt;% end -%&gt;<br>
<br>
<br>
<br>
Anyone have an idea of what I&#39;m missing here?<br>
Thanks,<br>
<font color="#888888">BJ Clark<br>
_______________________________________________<br>
Facebooker-talk mailing list<br>
<a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
</font></blockquote></div><br>