"Wild hair" is a truncation of the the plebian idiom "get a wild hair up one's ass." It means to act on a whim, brashly, without giving much or any rigorous consideration to what one is doing or the foreseeable impacts of one's actions (or words). The term connotes the notion of obsessiveness/manicality such as one might exhibit as when attenuating or abating the effects of an ingrown hair (the ingrown hair being the wild one) on one's posterior (or worse, rectum).
One can think of Hawkeye's phrase "When we get a wild hair" as meaning:
- "When the electorate opts whimsically to..."
- "When the electorate manically ..."
Which direction to go will be determined by context. The former is more likely what Hawkeye had in mind, at least based on the context of the rest of his remarks and the self evidence nature of Trump and his ethics.