SharePoint - SharePoint Survey: Rating Scale Design

Asked By Kyle Buggie on 14-Jan-10 06:38 PM

I am working with a Rating Scale question using the SharePoint 2003 Survey feature.  Unfortunately, the form is automatically wrapping my questions, and it is difficult to align the question with the corresponding response buttons.

Is there a way to unwrap the text?  I have seen screenshots with unwrapped text online.  If not, does anyone know of a way to adjust the spacing or format of the form?

Thanks in advance!

Manuel replied to Kyle Buggie on 05-Apr-10 10:29 AM
Hi, your issue is essentially CSS related but I'll give you a more rounded answer in case you want to do a buit more with surveys.  I think point 6 is all you really need.

1.    Create a custom list template based on the Surveys list template. (make a copy of features\surveyslist.  Make sure to change feature ID etc.

2.    Create a custom user control file (eg. mycustomtemplates.ascx) in the CONTROLTEMPLATES folder and copy the SurveyForm template from DefaultTemplates.ascx into your user control file.  Give it a unique ID (eg. mySurveyForm).  Also copy the directives and assembly declarations etc. into your ascx)

3.  You can also override the other linked controls such as SurveyFieldIterator and tworowcompositefiled by copying them into your custom template file, reanaming the ID and linking accordingly to the calling template.  This will give you greater control over the look and feel and you could even enhance the survey with custom code blocks for validation, presentation etc.  Once you have a handle on the form and the controls used to render questions (fields) you can do quite a bit.

4.    Edit the schema.xml from your custom survey list template and in the Forms section, specify the Form

Template


="mySurveyForm" SetupPath="features\mysurveyslist\forms\form.aspx"

5. If you want to further control the survey look and feel, copy the viewpage,aspx and form.aspx from Template\Pages into your custom list definition and change the SetupPath attribute to map to those.  You can then add js and css references on those pages. 

6. Inspect the rendered survey pages with IE Dev toolbar to identify css classes to override in your custom cssto get the look/feel you want.
Example: rating scale answer widths.
td.ms-ms-gridCol, th.ms-ms-gridCol
{
 
 width:auto;
}

Adam Saunders replied to Manuel on 06-Jun-10 11:28 PM
Hi Manuel,

I've been playing with sharepoint for a little while now.. mostly with creating my own web parts as needed...

I'm just having a bit of trouble with your steps...  unfortunatly for me, my first problem hits me at step 1..  :-)

I'm not able to find the 'Features\surveylist' bit...  where is this so that I can go and make a copy of it...??  do I do this through the sharepoint site itself, or through the sharepoint designer...???

Also, where do I find the CONTROLTEMPLATES folder...???  again is that through the site or through the designer...???

Thanks
Adam Saunders replied to Adam Saunders on 06-Jun-10 11:50 PM
Ok... slap me in the back of the head and say something like "You goose, you should have known this"..!!!!

But for those that don't, here is some help...

Here is the default location for the TEMPLATES and FEATURES folders:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES

I should be able to more on to the next few steps now..!!!