Check out the LimeSurvey source code on GitHub!

Bug Correction : Tokens, Attribute Fields

More
4 years 4 days ago - 4 years 4 days ago #92948 by lsga
Hi, just to say I corrected a bug in LS => Token => Attribute fields.

Before, when you created various attribute fields, they didn't appeared in the token form (just the last one), wich was provoking a bug when one of the none shown attributes was mandatory.

I don't know where to submit bugs correction, so I do it here.

application/controllers/admin/tokens.php
tokens::_handletokenform
$aData['attrfieldnames']=array();
/*LS HACK !!*/
$lsAttrFields = array();
$aAdditionalAttributeFields = Survey::model()->findByPk($iSurveyId)->tokenAttributes;
foreach ($aAdditionalAttributeFields as $sField=>$aData)
{
	if (in_array($sField,$aTokenFieldNames))
	{
		$lsAttrFields[$sField]=$aData;
	}
}
$aData['attrfieldnames']=$lsAttrFields;

Now, all attributes are shown in token form. ;)
Last Edit: 4 years 4 days ago by lsga.

Please Log in to join the conversation.

More
4 years 3 days ago #92968 by DenisChenu
Hello,

lsga wrote: Hi, just to say I corrected a bug in LS => Token => Attribute fields.

Before, when you created various attribute fields, they didn't appeared in the token form (just the last one), wich was provoking a bug when one of the none shown attributes was mandatory.

Don't understand, just try with last GIT version and it work.
I:
- Create 8 attribute, click "Add fields"
- Click add ne token entry : and have all atribute.

I don't know where to submit bugs correction, so I do it here.

www.limesurvey.org/en/community-services/bug-tracker :)

And for patch :
github.com/LimeSurvey/LimeSurvey

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form