Customer login  |   Contact us
Home Company Products Support Purchase
Forum Home » Survey software » Opinio plugins

Topic: Creating a new survey and survey attributes
Replies: 2   Pages: 1   Last Post: Jun 30, 2007 12:50 AM by: bkeyser


Back to Topic List Back to Topic List
Replies: 2   Pages: 1  
bkeyser

Posts: 13
From: Broomfield, CO, US
Registered: Jun 5, 2007
Creating a new survey and survey attributes
Posted: Jun 22, 2007 11:58 PM
  Reply

Hi,

When creating a new survey, the javadoc explains

SurveyManager.createSurvey(...)
The survey will be empty, with just the survey id set. Survey attributes must then be set, and stored with the updateSurvey() method.

Which survey attributes are supposed to be set? I have noticed that when creating a survey through the API and creating a survey through the UI, the following attributes are not set for the survey created through the API upon examination of hte ops_surveyattribute table

back txt
CSS URL
finish txt
footer
next txt
save txt
start txt
store opdata
survey heading
survey template name
thank you

Is there a list of attributes that should be defined? How does i18n factor into setting the attributes? Is there a general procedure for creating a survey (anything else that we should be aware of)?

Thanks,
Brian

torgeir

Posts: 1,096
From: Oslo
Registered: Jun 20, 2002
Re: Creating a new survey and survey attributes
Posted: Jun 27, 2007 7:09 PM
  Reply

The default values are not set when using the API, it seems (don't know why this has not been done). Use the i18n keys below to insert the defaults. For some attributes, the actual value is indicated.


> back txt
survey.texts.backButtonDefault

> CSS URL
template/survey/common/default/style.css

> finish txt
button.finish

> footer
If Lite edition: surveyAttributesForm.defaultFooter, otherwise empty by default - use ""

> next txt
survey.texts.nextButtonDefault

> save txt
button.save

> start txt
survey.texts.startButtonDefault

> store opdata
true

> survey heading
empty by default - use ""

survey template name
default

> thank you
survey.texts.thankYouNoteDefault

bkeyser

Posts: 13
From: Broomfield, CO, US
Registered: Jun 5, 2007
Re: Creating a new survey and survey attributes
Posted: Jun 30, 2007 12:50 AM
  Reply

Hi Torgeir,

Those worked, thanks! The two that didn't "take" were "survey template name" and "store opdata". The method survey.setAttribute(name, value) was used, but I don't believe this is right. Which methods should be called for these?

The others had actual method calls, like setBackButtonText(...).

Thanks,
Brian



© 1998-2013 ObjectPlanet, Inc. Øvre Slottsgate 5, 0157 Oslo, Norway Tel (+47) 2233 3360 | Fax (+47) 2233 3361