Using Invite codes in a gravity form

Want to use Gravity Forms to do a registration form. Also want to use invite codes. How do I define the invite code field through gravity forms correctly so that the codes get validated in Membership?