As it turns out, "Footloose" was partially based on a true story of Elmore City, Oklahoma that occurred in 1979, only five years before the film's release. From its very founding in 1898, the town outlawed dancing in order to mitigate alcohol consumption and lively activity (via BBC). 

In 1979, senior students at Elmore High School challenged the ordinance in order to have a prom. Their demand was met with indignation by the city council members, headed by a local minister who considered dancing a Satanic practice. The issue was resolved a year later by the city's school board, with a tiebreaking vote cast by a rancher who concisely proclaimed: "Let 'em dance." In a denouement that reads more like a movie plot than real life, the town is now recognized for its dance tradition over four decades later (via 405 Magazine). 

Elmore City wasn't the only small town with such an ordinance. Just two years later in 1981, Lynden, WA passed one that banned dancing at any event or place where alcohol would be served (via UPI). The issue received national attention, and many residents believed "Footloose" was also inspired by it.