ruby on rails - Formtastic form doesn't recognize text area added with javascript -


i have form i'm dynamically adding textareas. form comes way:

 <%= semantic_form_for :requisito, :url => update_requisitos_tramites_path, :html =>{ :id => "form_edit_req" } |f| %>  ... <% end %> 

when button clicked, function triggered , adds inside form next code:

<textarea rows="3"  class="textarea-obs" name="requisito[observacion]">¿por quĂ©?</textarea> 

and gets rendered expected (and code in right place, checked chrome's js console.)

i understand input type :text in form gets converted textarea id , class name model[attribute] getting value params in controller like:

params[:model][:attribute] 

or in case:

params[:requisito][:observacion] 

but i'm printing params in server's log , not value stored symbols. ideas?

i didn't solved recognition problem, changed code, wrote textarea in view hidden. javascript showing , hiding it, , if write name way said, works perfectly! think fact adding text area dynamically.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -