if I have the girl sign a form that she had consent to have sex with me and im 18 and shes 15 so would that prevent statutory rape
Not at all, since she's not an adult she cannot consent, her parents are in charge of her and the decisions she makes. Kids cannot consent for things because they aren't mature enough to make the right choice most of the time. If her parents were to give you consent to have sex with her that would be different but odds of that happening are slim.
yep stephanie is right but good luck getting that signed besides if she gives consent then she wouldnt tell anyone right?