Keyword

Extra field values - ordering

More
11 years 7 months ago #63382 by Uldis
Replied by Uldis on topic Re: Extra field values - ordering
I'm also very interested in this. If you need to add new value in alphabetic order there is now possibility to do this. Maybe someone found a solution for this?

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

More
11 years 7 months ago - 11 years 7 months ago #63383 by Micha
Replied by Micha on topic Re: Extra field values - ordering
I was looking for a working answer on this one to.
Never find one that really worked.

I started searching for a better way to fix the order of extra fields and found this.

Go to your phpmyadmin or whatever you use for your database. (See image)

1. Click on '????_k2_extra_fields' in the left column.
2. Click one time on the extra field number you want to change in the 'ID' column and start sorting it that way.

Worked out fine for me!

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 7 months ago #63384 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: Extra field values - ordering
I will add this feature to Multiple Extra Fields for K2 very soon, after the weekend.

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
11 years 6 months ago #63385 by Bernd Duhnke
Replied by Bernd Duhnke on topic Re: Extra field values - ordering
The best option is, when entering a new option to the dropdown list, the option automatically sorted alphabetically, or from small to large. Or changing it manually in backend like the extra fields.

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

More
10 years 11 months ago #63386 by K Coyne
Replied by K Coyne on topic Re: Extra field values - ordering
I also very much need this capability to re/order values for extra values as lists grow/change. The lack of this capability is an EXTREME limitation on extra fields.

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

More
10 years 7 months ago #63387 by Jim Van Zile
Replied by Jim Van Zile on topic Re: Extra field values - ordering
Just checking in, a post over 10 moths ago indicated this capability might be added to K2 shortly after the post, then a couple more posts from others interested in this feature. I too could really benefit from the feature. Any update coming in the near future?

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

More
7 years 3 months ago #163202 by Catherine Mollet
Replied by Catherine Mollet on topic Extra field values - ordering
Sorry to re-open this thread, but still nothing new about this since 2012? Any way to reorder extra fields values (or to sort them by alphabetical order) without changing values IDs in database?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 3 months ago #163214 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra field values - ordering
Mohamed delivered on his promise to extend this functionality in a plugin www.joomreem.com/multiple-extra-fields-groups-mefg-for-k2#.WYMJS9OGOis

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

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

  • Ronny Van Der Borght
  • Ronny Van Der Borght's Avatar
  • Offline
  • Senior Member
More
7 years 3 months ago #163292 by Ronny Van Der Borght
Replied by Ronny Van Der Borght on topic Extra field values - ordering
In your front-end templates you could do this:

Convert your extra field to a list with:

<?php $extrafieldtolist = explode(',',$this->item->extraFields->MyExtraField->value); ?>
<ul id="sortable-list">
<?php foreach ($extrafieldtolist as $extrafieldtolist): ?>
<li class="<?php echo $extrafieldtolist; ?>"><?php echo $extrafieldtolist; ?></li>
<?php endforeach; ?>
</ul>

and then do some jQuery magic:

<script>
(function( $ ) {
$(function() {
$( "li", "#sortable-list" ).sort(function( a, b ) {
return $( a ).text() > $( b ).text();
}).appendTo( "#sortable-list" );
});
})( jQuery );
</script>

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 3 months ago #163307 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra field values - ordering
Ronny,

Since you are a dev, why not include your website or some contact info in your signature ;)

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