Hi @kcivey, don't know if you ever found the answer, but I had the same problem. If you're just looking to add some "inert" attributes that will simply be displayed in the question editor and save to the DB (like question metadata) then it's a pretty simple edit to the PHP.
There is no reference data in the DB on what the valid attributes are. It's all in the code in the QuestionAttributes() function. In 1.92 this is in common_functions.php. In 2.0 it's in application/helpers/common_helper.php.
Here is a typical block from the function, for the maximum characters attribute. It show the question types, what category to display it in on the question form, etc.
$qattributes["maximum_chars"]=array(
"types"=>"STUNQK:;",
'category'=>$clang->gT('Input'),
'sortorder'=>100,
'inputtype'=>'text',
"help"=>$clang->gT('Maximum characters allowed'),
"caption"=>$clang->gT('Maximum characters'));
I wanted to control the number of decimals to display on reports in an outside system that imports the Limesurvey data. So below is the block I added. Just putting it in the function and saving was all that it took to have it show up on the question edit form (in a separate category called Custom) and it saves and retrieve from the DB. Since all attributes are stored in an "EAV" style table there are no DB changes necessary. Again, I'm not looking for this to affect behavior anywhere else in LS, just to be available for export. Also, anytime there is an update it may overwrite the file and you'll need to edit it again.
$qattributes["decimal_display"]=array(
"types"=>"*KN",
'category'=>$clang->gT('Custom'),
'sortorder'=>80,
'inputtype'=>'singleselect',
'options'=>array(0=>$clang->gT('0'),
1=>$clang->gT('0.0'),
2=>$clang->gT('0.00')),
'default'=>0,
"help"=>$clang->gT('Decimal places to display in reports'),
"caption"=>$clang->gT('Report decimal display'));
Any opinions from the developer team on this?
The topic has been locked.