1

I am trying to build a web part which allows users to see and interact with survey inside webpart.

I need to allow users to edit the webpart and choose a different survey in settings, so I cannot add survey using SP Designer. I can load the survey in CodeBehind. The only problem is showing associated form so users can fill the survey. I cannot find a way to move forward with this. What I have tried:

  1. Added SurveyFieldIterator. Shows fields but not form buttons (obviously).
  2. Tried Adding iframe to load survey form inside it. Cannot add iframe in ascx control. Get an exception.

I am sure there is a proper and easy way to display a list/survey form inside web part but I cannot find it.

What is best way to go with this?

Thanks

1 Answer 1

0

Follow below steps to achieve your goal

  1. Open the page in Sharepoint Designer.
  2. Click on the Webpart Zone where you want to add the Webpart.
  3. In Menu Click on Insert -> Sharepoint Controls -> List Form.
  4. Select the survey in first Drop Down List and select New form radio button click ok.

Note:- If you dont want to navigate the pages to survey page after completing the survey. Add source Parameter to You query string in the URL.

For E.g.:- <site>/a.aspx?Source=<site>/a.aspx.

1
  • Sorry, my question was not clear enough. I added clarification now.
    – irf.abid
    Feb 16, 2017 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.