Bug Correction : Tokens, Attribute Fields

More
4 years 5 months ago - 4 years 5 months ago #92948 by lsga
lsga created the topic: Bug Correction : Tokens, Attribute Fields
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 5 months ago by lsga.

Please Log in to join the conversation.

More
4 years 5 months ago #92968 by DenisChenu
DenisChenu replied the topic: Bug Correction : Tokens, Attribute Fields
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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now