开发者

How to prepopulate few fields in a form, in a survey

I have a share point survey. When we responding to the survey, as we know, it will op开发者_开发百科en NewForm.aspx. this page contains a ListFormWebpart in which questions from survey list will be displayed. Now, i need to add few labels before the questions and these label values should be prepopulated from query string. What i am trying to achieve from this is, i wll created a link with some values in query string and send to specific users. different users might have different values in query string. Whenever they click on the link, it should open the survey with prepopulated label values along with questions in list.

I am not sure, how to do it. I have tried to add some html control to web part(using share point designer) and through JavaScript i have tried to set query string values. Then i tried to put asp controls and trued. it didn't work. I am trying since last 2 days. No progress. I am using SharePoint 2003, WSS2.0

Can anybody, please help me to implement this solution.


You may find it easier to create a webpart with a custom form that enters data into the survey list.

The survey lists are useful as they are quite flexible, but your solution will likely make it hard to change your list in future. That means that a webpart specific for this survey may be a valid design decision for you.

An issue with your current implementation is that passing values specific to different users through the query string does not give you any guarantee that enterprising users will not change those values. This may not really be an issue depending on your situation, but a custom control will allow you to query the current user and make decisions that way.


I have written some Java Script for reading query string, parsing and assigning values to controls based on their ControlID. I have used Content Editor Web Part to add this JavaScript to the Existing Survey page. Then this script has done job of prepopulating the fields.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜