Got the form working by adding RequestContext(request) to the return statement.