in reply to
Whats wrong with this code.
"It doesn't work" doesn't give us enough information to diagnose the problem.
Does the form not submit? Then compare the html.
Does the script receiving the form input behave incorrectly? Then we need to see that code to see what it is doing. Please provide the smallest working example that still demonstrates the problem. By reducing your code like this you will likely find the problem, and if not it will help us find the problem quickly without digging through 300 lines of code.
The form looks ok, and the only significant difference I see is that you named the submit button '.submit' in the original code, and 'submit' in the 'simple print' version.