[Facebooker-talk] Custom Form Builder Help
David Clements
digidigo at gmail.com
Thu Apr 10 16:44:52 EDT 2008
I think @schools should be @school the form builder is looking for @school
Dave
On Thu, Apr 10, 2008 at 2:41 PM, BJ Clark <bjclark at scidept.com> wrote:
> Hello All,
>
> We use a different custom form builder for our app, but I wanted to
> use facebooker's typeahead widget in side the other form builder.
> I don't know much about form builders, but I created a file in lib/
> doing this:
>
> http://pastie.caboo.se/178776
>
> It works great, except that the id's and class names get messed up.
> Instead of school_name, I get nilClass_name.
> The other methods work fine however.
>
> Here's the form:
> <h1>New School</h1>
> <%= show_flash %>
> <% af_form_for :school, :url => schools_path, :html => {:method
> => :post } do |f| %>
> <%= f.typeahead :name, @schools, "name", "name" %>
> <div class='label'>School Type</div>
> <%= f.radio_button :type, "College", :label => "College/
> University", :span => 4, :last => true %>
> <%= f.radio_button :type, "HighSchool", :label => "High
> School", :span => 4, :last => true %>
> <%= f.hidden_field :nid %>
> <%= f.submit "Create School" %>
> <% end -%>
>
>
>
> Anyone have an idea of what I'm missing here?
> Thanks,
> BJ Clark
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080410/5fe0439c/attachment.html
More information about the Facebooker-talk
mailing list