Sharepoint Survey: Can I add a comment box to a question?

Recently, there was an interesting question in stackoverflow

I am doing a survey in SharePoint, using the built in survey tool.

I want to add a comment box next to my “ratings” questions. e.g.

Q1. Do you like fish?

  1. Not at all
  2. They’re alright
  3. I love fish!

Comment:

How can I do this all within one question? I can obviously add a new text question, but this will become Q2, and I want it to be part of the same question.

Any idea how I can do this?

By default SharePoint does not give us this option. So how can you do this? Here is a work around.

  1. Add a Question, with Text box, below the question under which you need this comment box.
  2. Edit the Newform.aspx page and insert a content editor webpart in the below of existing survey webpart.
  3. Copy and paste the below code in the content editor webpart

[sourcecode language='javascript']

[/sourcecode]

In the above code ctl00_m_g_c7647c31_a9f9_4f27_aa53_e0728c485b2c_ctl00_ctl01_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField is the ID fo the Comment Textbox control. (You can get it by Viewing the Source code of the page).

All we do is get the container of the Textbox control and hide it. Here is the screenshot of a sample survey

About Hojo Clement

Hojo Clement was working in US Technology in Trivandrum as a Senior Software Engineer. He has 6 years experience in working with Web Development Technologies inlcuding MOSS and ASP.net.

13 thoughts on “Sharepoint Survey: Can I add a comment box to a question?

  1. I need to create a survey in sharepoint 2010.for a single question i need more than one answer type.for example i have a question

    q1) who is tall?

    a)raja
    b)gopal
    c)rajkumar

    Now i need to add another text box below this with an description “Others” to enter an Answer other that of those options listed above.

    can u give me the solution.

  2. Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter
    and said “You can hear the ocean if you put this to your ear.” She put the shell to her ear and screamed.
    There was a hermit crab inside and it pinched her ear. She
    never wants to go back! LoL I know this is completely off topic but I had to tell someone!

  3. Definitely believe that which you stated. Your favorite reason appeared
    to be on the internet the easiest thing to be aware of.

    I say to you, I definitely get annoyed while people consider worries that they plainly don’t know about.

    You managed to hit the nail upon the top and
    also defined out the whole thing without having side-effects , people can take a signal.

    Will probably be back to get more. Thanks

  4. I’m not sure where you’re getting your info, however
    good topic. I must spend a while learning more or
    working out more. Thanks for fantastic info I used to be looking for
    this info for my mission.

  5. I don’t know if it’s just me or if perhaps everybody else encountering problems with your website.
    It appears like some of the written text in your posts are running off the screen. Can somebody else please provide feedback and
    let me know if this is happening to them too? This may be a problem with my web browser because I’ve had this happen previously.
    Many thanks

  6. Magnificent goods from you, man. I’ve understand your stuff previous to and you’re just extremely fantastic.

    I actually like what you’ve acquired here, certainly like what you’re
    stating and the way in which you say it. You make it enjoyable and you still take care of
    to keep it wise. I can not wait to read much more from you.
    This is actually a wonderful site.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>