add a new type?

0 views
Skip to first unread message

Yuri

unread,
Oct 7, 2008, 5:43:12 AM10/7/08
to PloneSurvey
hi!

I'm trying to add a new type, SurveyGridQuestion. Basically a Text
question with a DataGridWidget.

For now, I'm just trying to add a clone of SurveyTextQuestion. How
to? I've tried to do the same for SurveyTextQuestion, copyng the files
and changing names, but zope fails to start and spin indefinitely.

Any idea? Then I will need also to reinstall it to re-apply the
profile (profiles/default/type*)

Yuri

unread,
Oct 7, 2008, 6:34:30 AM10/7/08
to PloneSurvey
solved, I've forgot the factorytool.xml and propertiestool.xml part :P

Yuri

unread,
Oct 7, 2008, 12:04:32 PM10/7/08
to PloneSurvey
:D

http://cmfquestions.googlegroups.com/web/grid.png?gsc=puOCbQsAAACgGv3HrUwDD7i2kXyyNW89

still can't save the data, tomorrow I'll work to complete it :P

Michael Davis

unread,
Oct 7, 2008, 12:16:02 PM10/7/08
to cmfque...@googlegroups.com
Hi Yuri,

I would suggest a different approach, which is similar to how the
surveyMatrix works.

Basically have two types: SurveyGrid, SurveyGridQuestion.

SurveyGrid is folderish, contains the question, and deals with the view etc.
SurveGridQuestion is the actual question, and deals with the answer,
validation etc.

The view applied to the SurveyGrid just iterates over the sub questions and
displays them how you want them. That follows the same pattern in
PloneSurvey, where each question box is a seperate object, rather than
trying to add in a question, which is effectively a group of questions.
Doing it using DataGrid will probably be painful on other elements of the
product, like how the survey results is displayed, and effectively removes
the ability for the survey owner to modify the sub questions in the
SurveyGrid.

Cheers
Michael


On 7/10/08 17:04, "Yuri" <yurj....@gmail.com> wrote:

>
> :D
>
> http://cmfquestions.googlegroups.com/web/grid.png?gsc=puOCbQsAAACgGv3HrUwDD7i2

Yuri

unread,
Oct 8, 2008, 4:27:17 AM10/8/08
to PloneSurvey
SurveyGrid saves and load values as it would be a text question. Doing
a folder don't add anything, cause there are a variable number of
questions.

The idea is to store the value as it would be an input and load it
back in the widget.

On 7 Ott, 18:16, Michael Davis <M.R.Da...@cranfield.ac.uk> wrote:
> Hi Yuri,
>
> I would suggest a different approach, which is similar to how the
> surveyMatrix works.
>
> Basically have two types: SurveyGrid, SurveyGridQuestion.
>
> SurveyGrid is folderish, contains the question, and deals with the view etc.
> SurveGridQuestion is the actual question, and deals with the answer,
> validation etc.
>
> The view applied to the SurveyGrid just iterates over the sub questions and
> displays them how you want them. That follows the same pattern in
> PloneSurvey, where each question box is a seperate object, rather than
> trying to add in a question, which is effectively a group of questions.
> Doing it using DataGrid will probably be painful on other elements of the
> product, like how the survey results is displayed, and effectively removes
> the ability for the survey owner to modify the sub questions in the
> SurveyGrid.
>
> Cheers
> Michael
>
> On 7/10/08 17:04, "Yuri" <yurj.sp...@gmail.com> wrote:
>
>
>
> > :D
>
> >http://cmfquestions.googlegroups.com/web/grid.png?gsc=puOCbQsAAACgGv3...

Yuri

unread,
Oct 8, 2008, 10:39:09 AM10/8/08
to PloneSurvey
I did it, now plonesurvey can support datagrid input :P

details coming.
Reply all
Reply to author
Forward
0 new messages