Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Loading data in to an XForm



I am very new to EPiServer development, so this may be a rookie question, but here goes!

In EPiServer 7.5 I have a block containing an XFrom for setting user preferences. The form consists of 1 textbox (email address) and 4 checkboxes for mailing preferences. When the form is created the controller reads the current preference settings from the database, using an ID paramater passed in the URL, and I then want to pre-populate the form with these details. 

I can get the email address textbox populated using the following code:

viewModel.Form.SetInstanceData("email", email);

However, I can't seem to use this for setting the checked value of a checkbox. Has anyone had any experiance in this kind of thing who could point me in the right direction?

Cheers, Chris.

Jul 22, 2015 10:10


What you could do I think have your own render template of xform. By doing this, you could read from setting and decided what to render. You could refer to following blog

I think that easy way to go.

Jul 22, 2015 10:57
* 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.