How is the fox able to capture Chanticleer? What moral is this supposed to teach?
This is a question from the Nun's Priest Tale (it's always helpful to be as specific as possible when asking a question).
The fox is able to capture Chanticleer by flattering him. While at first Chanticleer is wary of the fox, the fox continues to lavish praise on him, until Chanticleer's pride leads him to believe that the fox won't hurt him. The moral, then, is pretty clear: vanity is dangerous. However, this is not the only moral in the story and is probably an inconsequential one. Think about why Chanticleer went into the yard. He went to please Partlet, whom he loves very dearly. It is, therefore, for love of Partlet that Chanticleer becomes the fox's victim.
The obvious moral lesson of the foolishness of succumbing to empty flattery diverts attention from a more subtle warning to beware the advice of women. This was a popular medieval theme. Woman, the original seductress, was the source of much of Man's sinfulness. As the weaker and less intellectually endowed of the two sexes, Woman was not a reliable counselor. Although in today's world a moral like this would not be acceptable, back then, it was perfectly normal.
That moral continues to the end of the story when Chanticleer goads the fox into taunting the farmers about his catch. In opening his mouth to speak, the fox then loses Chanticleer. Just another example of keeping your pride down as a moral used by the nun's priest.