Edit This Code:
See Result »
Personalia:
Name:
Email:
Click the "Try it" button to return the id of the form the legend belongs to.
Try it
Result: