Fieldtype, Module

Archived
Forum
(read-only)

eeXam

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Coffee Bean Design

     

Question type - Connect related terms

Support Request

Djive
Djive

Hi

Would it be possible to have a “connect related terms” kind of a question type?

For example:

apple - fruit
            - furniture
            - animal

dog   - fruit
          - furniture
          - animal

chair - fruit
          - furniture
          - animal

but without having those in 3 separate questions.

For example, you would enter in entry in the eexam field the following:

apple (fruit)
dog (animal)
chair (furniture)

and on the front end you would get something like this:

apple (select dropdown with 3 possible answers - fruit, animal, furniture)
dog (select dropdown with 3 possible answers - fruit, animal, furniture)
chair (select dropdown with 3 possible answers - fruit, animal, furniture)


How complicated is to achieve something like this, is it even possible?
If it is, could you give us few pointers?


Thanks a lot for a great addon and your great support! :)

Coffee Bean Design
# 1
Developer
Coffee Bean Design

For setting up a basic new question see:

https://devot-ee.com/add-ons/support/eexam/viewthread/15376

You will have to figure out the best way of storing the choices and options. Might be easiest to use the choices question type and enter your data as a piped string i.e.

option|answer 

Then on the field() method you would have to loop through all choices, explode the strings and build the necessary select inputs.