I have an unauthenticated VF page that displays some information from the parent record. Below that I have a bunch of textboxes where users enter child object specific information and click on Save, which should create a new child record associated with the parent. The URL will contain the id of the parent record.
The way I am doing this now is:
Created a VF page with a bunch of apex:outputField to display the parent information.
Created a lot of apex:inputText to capture the user input related to the child.
Created a custom controller with a lot of public String field_id_on_the_form{get; set;} and then doing child_object.field__c = field_id_on_the_form;
This works. The problem is that there are a lot of fields for the child record (about 120. So I have 120 lines of {get;set;} and 120 lines of assigning the form values back to the child object. Not to mention I haven't yet implemented field validations yet.) and I feel that there should be a better way to do this. I am new to the Salesforce world, so wondering what the best way to implement this scenario is.
I think I can't use Standard Controller because the id in the URL belongs to the parent. Most of the user input on the form belongs to the child. So? What is the best way to do this if I have 120 fields on the form that need to be validated/captured before creating the child record?
Any high level code snippets would be nice. Thank you!