Jeffrey L. Taylor wrote:
> Quoting Victor Martin <[email protected]>:
>> end%>
>> This way, it does not insert the partial. But, if I remove the
>> "link_to_function", it does insert it!
>
> I am confused. Is the 'group' partial the first bit of code? And the
> second
> piece of code calls it? And what is the contents of the text partial?
>
> Jeffrey
_text is like this:
<% options = {'Normal text' => 'normal', 'Highlighted text' =>
'highlighted', 'Notes' => 'notes'} %>
<div class='text'>
<p>
Text <%= text_field_tag :Title, nil, :size => '50' %> Importance <%=
select_tag 't1', options_for_select(options)%>
<remove><%= link_to_function 'Remove text field',
"this.up('.text').remove()" %></remove>
</p>
</div>
This is (or I try it to be) a complex forms whose text fields are in
groups, and you can add and remove both text fields and groups. The only
thing that is not working is the "Add group" link_to_function.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---