I am wondering is it possible to pre-populate some dynamic data to the xform dropdown list box? The scenario is I have a xform that contains a dropdown list box, and I would like to load some page names into it
Short answer: There's not an easy way.
My current project needs to have a subscription block section on the sidebar, it needs to have a dropdown listbox that list all pages from certain page type and email textfield, so user could register their interest page. we then can export this data and manually import into campaign monitor to send a campaign.
The reason I choose xform is the built-in export functionality, so I don't need to create a custom plug-in to extract the data in csv format. Previously for such requirement, I always save the data into the dynamic store and create a custom plug-in to provide the extract functionality.
Is this an EPiServer 7 MVC site?
Just an idea, but what I'm thinking you could do is to make the XForm in the system as normal, then in the block view, manually create a form (not using the RenderXForm helper), and pass the XForm ID along with the form. Then when it's submitted, take the values from the form and inject it into the XForm using that ID, and have the XForm submit has normal.
If you're using MVC, check out this post to see how I made XForms work in a block: http://cjsharp.com/blog/2013/04/11/creating-a-xform-block-in-episerver-7-mvc-with-working-validation-updated/. This could probably be a good base you could start with.