November Happy Hour will be moved to Thursday December 5th.

How may I prepopulate form data?

Vote:
 
Is it possible to have prepopulated fields on an EPiServer form? I wish to include form fields such as username so that an email generated by the submission of a form can have specific data appended to it. In a addition it would be useful to set the value of other fields within the form depending on how the form was visited. For example we have a list of suppliers listed on our website, against each supplier we have a link to a generic contact form. I would like to reuse this single form for all of our suppliers but it would be very useful for the Supplier Name field to be prefilled with the corresponding entry from which the link was called. Is this possible? A second example of functionality which is desired is that we hold the full mailing address of our site members in a legacy database, we would ideally like to automatically fill-out this address in a form so that the user can submit an email request for information without having to enter this themselves. We have currently had to split this into two separate steps one which generates an email containing their address and the other containing the question and other form data this is not ideal. Any advice in this area would be much appreciated.
#12713
Jul 17, 2006 11:49
Vote:
 
Hello Phil! I just added two new XForm samples to the code sample areas. One shows how to pre-populate one of the sample forms before showing it to the user. The other one shows how to create your custom e-mail instead of using the built in one. You can download them here: http://www.episerver.com/en/EPiServer_Knowledge_Center/developerforum/2628/6042/ ps. It's also possible to add any custom key/value pair to the form data when the form is beeing submitted. See the SDK and XForms Tech Note for more info about this. ds.
#14776
Jul 21, 2006 9:48
Vote:
 
The XForm samples don't appear to be there - there's just an empty 'View Source' element.
#14777
Jul 21, 2006 14:34
Vote:
 
Ah, the URL wasn't complete. There should be two: http://www.episerver.com/en/EPiServer_Knowledge_Center/developerforum/2628/6042/Send-custom-email/ and http://www.episerver.com/en/EPiServer_Knowledge_Center/developerforum/2628/6042/How-to-pre-populate-a-form-with-data/
#14778
Jul 21, 2006 14:36
Vote:
 
Hello, Many thanks for replying to my post, I am excited that someone is perhaps able to provide a solution for me. Unfortunately your second link takes me to a page which has the view source link on it but then this subsequent page does not have the links to either the ascx or ascx.cs. Would you be able to verify that your source code was uploaded successfully as I am keen to see how to do this? Thanks, Phil.
#14779
Jul 24, 2006 14:03
Vote:
 
Hi Phil! The code had accidently been uploaded to the wrong folder, it has been fixed now. The code is now available here: http://www.episerver.com/en/EPiServer_Knowledge_Center/developerforum/2628/6042/How-to-pre-populate-a-form-with-data
#14780
Jul 27, 2006 11:16
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.