(remote_)for_form placement, most bizar error seen so far

Dear list,

I must be going mad. My code:

<p class="online_more_info" style="display: none">

<%=h user.phone %><br /> <%=h user.company %><br /> <% @message = Message.new %> #UGLY, someone has a solution? <% form_for([@project, @message]) do |f| %>   <%= f.hidden_field('recipient_id', :value => user.id ) %>   <%= f.text_area('text', :size =>"10x4") %><br />   <%= submit_tag('Verstuur') %> <% end %> </p>

So the form is enclosed in a hidden p tag. This works like a charm in Opera, however in FF the form does show! 'show source' shows the correct HTML but Firebug shows that the p tag closes _before_ the form. Really really weird. Does this sound familiar to someone?

With kind regards, Harm

PS @message can be empty as it is really simple, now fixed with an ugly hack. Any suggestions?

The P element cannot contain block-level elements like FORM [1]. Firefox tends to be pretty strict about form elements, so I suspect that's your problem. It should work if the wrapping element is a DIV instead.

[1]:P - Paragraph

That must be it. Thank you I didn't know that(obviously). Thanks for the link as well.

mboeh@desperance.net wrote: