Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Desision Tree Builder


Go to End


4 Posts   1019 Views

Avatar
Bonner

Community Member, 21 Posts

18 November 2014 at 5:01am

Edited: 18/11/2014 5:04am

Does anyone know of a module that can build a decision tree in a similar fashion to a workflow?

So you have something like:
Q1. How old are you?
A1. 6-12
.. Q2. Do you live within 1 mile of your school?
.. A1. Yes
.. .. Outcome: You qualify.
.. A2. No
.. .. Outcome: You do not qualify.

A2. 13-16
.. Q2. Do you have special educational needs?
.. A1. Yes
.. .. Outcome: You qualify.
.. A2. No
.. .. Outcome: You do not qualify.

A3. 16-18
.. Q2. Do you have special educational needs?
.. A1. Yes
.. .. Outcome: You qualify.
.. A2. No
.. .. Q3. Do you live within 1 mile of your school?
.. .. A1. Yes
.. .. .. Outcome: You qualify.
.. .. A2. No
.. .. .. Outcome: You do not qualify.

A4. 19-21
.. Outcome: You do not qualify.

I'm mainly concerned about the admin side, as I would like to write something in JavaScript that uses JSON to postback the answer and get the next set of questions to present.

Avatar
camfindlay

Forum Moderator, 267 Posts

18 November 2014 at 3:42pm

I haven't seen an explicit decision tree module, however I know the userforms module can do some conditional logic, there was also a flowcharting module http://addons.silverstripe.org/add-ons/adrexia/flowchart that you could perhaps extend as the basis of your UI?

Avatar
Bonner

Community Member, 21 Posts

19 November 2014 at 4:21am

Hi Cam

Thanks for the suggestion however I've gone with a bespoke solution as after the initial planning I realised that it would only take a day to code.

Once again, thanks.

Avatar
swaiba

Forum Moderator, 1899 Posts

20 November 2014 at 2:40am

Seems to me like descion tree module could mean flowchart module - therefore I must add this as a suggestion regardless of wether you have a solution - https://github.com/adrexia/silverstripe-flowchart