Values of drop_down lists

18 years 3 months ago #3753 by petschni
Values of drop_down lists was created by petschni
Hello,

i have the following problem. If someone slecets a field in the drop-down list the actual value is saved and not some kind of secondary key.

This means, that i i change the value of a field (be it because of a typo) it does not get updated.

Is there a workaround for that?

peter

Please Log in to join the conversation.

18 years 3 months ago #3756 by nant
Replied by nant on topic Re:Values of drop_down lists
Your best approach would be to use language fields.
So lets assume you have a drop down field with 3 allowable values. I would create 3 language variables like:
  • DEFINE('_UE_VALUE1','one');
  • DEFINE('_UE_VALUE1','too');
  • DEFINE('_UE_VALUE3','three');

This way even though we have a typo in the second option (too instead of two) the actual value stored in the database is _UE_VALUE2. So when we fix the second language define the correct value will be displayed to the end user.

Hope this makes sense.

Please Log in to join the conversation.

18 years 3 months ago #3795 by petschni
Replied by petschni on topic Re:Values of drop_down lists
That sounds like the thing i was looking for. Where do i definde the language field?

Please Log in to join the conversation.

18 years 3 months ago #3822 by nant
Replied by nant on topic Re:Values of drop_down lists
In the language file .. components/comprofiler/plugins/languages/

default.php or other languages

(well something like that path)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.192 seconds

Facebook Twitter LinkedIn