correctly deals with submits of forms of type dialog