::before
and ::after
don't create pseudo elements before and after a targeted element, they actually create elements before and after any content within an element. Therefore all your CSS is doing right now is creating some pseudo elements within the already floated form element, so it correctly has no effect on the "outer" context.
You must wrap a div or some other block element around the 2 floated elements and then apply clearfix styles to it. There is no other way around this unless you want to specify a fixed margin or something like that which I don't think anyone would recommend.