For subscription I have a simple form:
- Enter email address (Text input field)
- Choose gender (2 Radio buttons)
- Choose profile type (OptionList with predefined profiles)
I want to validate the input and then insert the data into 3 tables (Account, AccountProfile and Email).This is, because one user can have only one account, but muliple profiles and email addresses.
So my 3 models look like this (simplified):
[Account]
- gender_id (related to Gender)
[AccountProfile]
- account_id (related to Account)
- profile_id (related to Profile)
[Email]
- email_address
- account_id (related to Account)
So how can I create a form (and later validate it)?