Keyword

Extra Field Drop-down selection add new one but sorting them alphabetically

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
2 months 1 week ago #171176 by George Nasis
George Nasis created the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
Hallo,

I use several drop-down selection extra fields. I would like to know how to sort them alphabetically because I would like to add new ones.

To write them from beginning is not a solution because of the number of them and most important there are published K2 items and if I change the names then the extra field values will break.

Thank you

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #171177 by Fotis
Fotis replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
It's possible, but it would require to hack core K2 files to enforce the order you want.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
2 months 1 week ago #171178 by George Nasis
George Nasis replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
Hi Fotis,

yes sure it would be an option. Another option that i found is to change the order inside the k2_exta_fields table for he specific values I want. So no hack is required.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #171179 by Fotis
Fotis replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
You could do the same through the extra field manager, it's the same thing ;)

A list is presented as a dropdown but when you select a value and save it in the item, then this value is static, meaning it can't change unless you edit the item and that particular value was missing from the drop down list.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
2 months 1 week ago #171180 by George Nasis
George Nasis replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
Yes of course when it is selected it is indeed static. But I have about 40 options in the drop down that I display to user to choose between them :) So there I have to order them alphabetically.

In extra fields manager I could add an option in the end and transfer with the hand all the values to that direction but it is not working, because for the items that already a value has been assigned will break :)

So the most convienient way without not hacking the core is to add options in the end and then in the table of k2_extra_field to put to the right order

Thank you very much Fotis!

Looking forward of v3

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 1 week ago #171193 by Fotis
Fotis replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
I'll note it down to add a re-order option in the coming versions.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
2 months 1 week ago #171257 by George Nasis
George Nasis replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
 That would be very convenient Fotis

Thank you again!

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 6 days ago #171259 by Fotis
Fotis replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
You're welcome.


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
2 months 5 days ago #171269 by Mohamed Abdelaziz
Mohamed Abdelaziz replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
If you like to have a look, MEFG for K2 already has this feature.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 months 5 days ago #171276 by Fotis
Fotis replied the topic: Extra Field Drop-down selection add new one but sorting them alphabetically
...And you obviously get more than re-ordering ;) Thanks Mohamed for sharing this!


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

Moderators: william white

Powered by Kunena Forum