Scenario: I've created a VF page that uses the Account standard controller with an extension that I created to pull contacts related to that account into a multi-selectable list using a wrapper class. Guests that access this page with the correct account ?id= in the URL are able to select multiple existing contacts at a time and, using 2 command buttons, perform a DML update on the selected records to set a Boolean to True or False. This works fine.
Objective: I would like to extend it so that guests that access the page can also add new contacts to the list from the same page, using a separate pageblock and set of command buttons.
I figured I would accomplish this by just making a few public {get; set;} Strings in the extension and adding inputFields to the page that set those public Strings and then make a custom save command that puts together a new contact record related to the account with the values of the strings and does a DML and then a PageReference to reload the page.
This is fine I'm sure for First Name, Last Name, and Email... but we also have a custom Picklist on the Contact object called Title__c. I've never rendered a picklist in VF before, and especially not a picklist from the account's child object through custom extension.
Question: How do I render the Contact picklist, with the correct values, on the custom Account VF page and then get the value that was selected to insert into the new record before DML, so that I can have a 'create new' style form on the page that allows them to dump in new contacts on the fly?
Alternative Question: Can I, alternatively, somehow create my own custom picklist with my own custom values via the extension class itself, and then get the option that they selected and pass it using set; to a string in the extension?
I hope this makes sense, happy to clarify or provide existing extension/page code if deemed necessary.