If you know the quantity upfront in your controller, then you can instantiate multiple objects to serve as placeholders and chuck them in a map with the key being an Integer index (1 to MAX_QUANTITY). Then you can iterate through the indexes and pull the corresponding placeholder object instance from the map and display it on the page. A quick starting point example:
Controller:
public Map <Integer, ProntoEvents_Attendee__c> peas {get;set;}
// In your constructor or your page action method
public YOURCLASS()
{
peas = new Map <Integer, ProntoEvents_Attendee__c> ();
// Create multiple instances (placeholders)
for (Integer i = 1; i <= PRODUCT_QUANTITY; i++)
{
peas.put(i, new ProntoEvents_Attendee__c());
}
}
VisualForce Page:
<apex:repeat value="{!peas}" var="index">
<apex:outputText value="Attendee {!index}" />
<apex:inputField value="{!peas[index].Attendee_Name__c}" styleClass="form-control"/>
<apex:inputField value="{!peas[index].Email_Address__c}" styleClass="form-control"/>
<apex:inputField value="{!peas[index].Title__c}" styleClass="form-control"/>
<apex:inputField value="{!peas[index].Company__c}" styleClass="form-control"/>
<apex:inputField value="{!peas[index].Dietary_Requirements__c}" styleClass="form-control"/>
<apex:inputField value="{!peas[index].Comments__c}" styleClass="form-control"/>
<br />
</apex:repeat>
Controller Save Method:
public pageReference save()
{
List <ProntoEvents_Attendee__c> attendeesToInsert = new List <ProntoEvents_Attendee__c> ();
for (ProntoEvents_Attendee__c attendeee : peas.values())
{
// Check only for populated fields (blank should be ignored I guess)
if (attendee.Attendee_Name__c != null)
{
attendeesToInsert.add(attendee);
}
}
insert attendeesToInsert;
}
This is not the only and not necessarily the best approach, but it's one of the many possible solutions. Tweak it to suit your needs.