Select question type in multiplex save as numerical value rather than option text

Permalink Browser Info Environment
I have a select field in a multiplex question type with Text-based Options (say, blue, red, and green). When they are exported or viewed through the list block, they are displayed as 0, 1, 2 rather than the actual options.

I have been looking around in the files in models=>attribute=>types=>multiplex and I *think* I've found where the data gets inserted into the database in the controller.php in the saveForm function, around line 172. But, I don't know what to do about it. I do see that 'mpqValue' gets inserted into the database, and maybe I need to create a condition where if the mpqtID == 3 then insert 'mpqOptions' instead?

Here's what I was thinking...but I can't figure out exactly how to fit that into the controller.php:
if($question['mpqtID']==3){
                  $db->Execute('insert into atMultiPlexAnswers (avID,mpsID,mpqID,mpqOptions) values (?,?,?,?)', array($this->getAttributeValueID(),$mpsID,$mpqID,$val_sting));
                  }else {
                     $db->Execute('insert into atMultiPlexAnswers (avID,mpsID,mpqID,mpqValue) values (?,?,?,?)', array($this->getAttributeValueID(),$mpsID,$mpqID,$val_sting));
                  }


Any insight would be appreciated. I keep getting errors when I try to modify the controller.php because I'm not setting up the if/else structure correctly.

Type: Discussion
Status: New
kspitzley
View Replies:

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.