[Facebooker-talk] Custom Form Builder Help
BJ Clark
bjclark at scidept.com
Thu Apr 10 16:41:14 EDT 2008
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
More information about the Facebooker-talk
mailing list