I have a horrible feeling the answer to this is that is not possible but anyway here goes. I have learnt today that <form> and </form> have "hidden" carriage returns in them.
I can remove the carriage return in the closing tag by inserting style="display: inline;" in the opening tag as in
<form style="display: inline;" id="friendform">
But is there a way of removing the carriage return from the opening form tag?