Hitler wasn't elected, he was appointed by Paul von Hindenburg.
not entirely correct. Hitler's NSDAP Party was legally elected into Parlament in sufficient numbers that they were able to form a coalition.
Hitler used certain "dangers" of the time to convince von Hindenburg (and the Parlament) to grant him exclusive power for a limited time. Of course, once he had the exclusive power - he alone was able to extend the "limits" as he saw fit.
Fact remains - the NSDAP was duly elected by the people in a free and fair election. It was the political system of the time which allowed Hitler to take advantage of loopholes and thus become a Dictator.