erwin
unread,Oct 9, 2012, 10:46:37 AM10/9/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SimpleForm
I guess it's not a simple_form related issue, but maybe some user
already had this 'interrogation' w form
I have an Event Model with a parent Place association
class Event < ActiveRecord::Base
belongs_to :place
accepts_nested_attributes_for :place
attr_accessible :place_attributes
In a new event registration form, the user should have the choice to :
- select from an existing Place
- enter a new Place in a nested form
= simple_form_for @event
= f.association :place, :collection => Place.all(:order =>
'label'), :prompt => "Choose an Place", :label => false
..
= f.simple_fields_for :place do |pf|
#geolocation.form-inputs
= pf.simple_fields_for :geolocation do |g|
= render "backoffice/places/
geolocation_fields", :f => g
should I manage that with a jQuery script ?
- when user select a place , it will clear the nested place form
- when user enter data in the nested place form, it will reinitiate
the place select
how can I manage the duplicated attribute param ? ( should the js
script add/remove the corresponding html elements ?)
I'm a little bit lost in translation.....