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
5 years 9 months ago #171176 by George Nasis
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.

More
5 years 9 months ago #171177 by JoomlaWorks
It's possible, but it would require to hack core K2 files to enforce the order you want.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
5 years 9 months ago #171178 by George Nasis
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.

More
5 years 9 months ago #171179 by JoomlaWorks
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.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
5 years 9 months ago #171180 by George Nasis
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.

More
5 years 9 months ago #171193 by JoomlaWorks
I'll note it down to add a re-order option in the coming versions.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
5 years 9 months ago #171257 by George Nasis
 That would be very convenient Fotis

Thank you again!

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

More
5 years 9 months ago #171259 by JoomlaWorks
You're welcome.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
5 years 9 months ago #171269 by Mohamed Abdelaziz
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.

More
5 years 9 months ago #171276 by JoomlaWorks
...And you obviously get more than re-ordering ;) Thanks Mohamed for sharing this!

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum