Keyword

Extra field values - ordering

More
13 years 1 month ago #63372 by Ania
Extra field values - ordering was created by Ania
I've got the following problem with K2 extra fields:

I have several extra fields where I need to put number values. I create i.e. an extra field (drop-down list or multi select list) called "lenght" . I put put 100, 200, etc. but then when I need to add i.e. 30 it goes to the end of the values list. It means the values aren't ordered and I need them to be ordered.Otherwise, when I leave it at the end, the K2 Extra fields Filter & Search doesn't work properly.

I can't use text fileds. They must be a list.

Is there any way the values are ordered automatically ?

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

More
13 years 1 month ago #63373 by Aaron
Replied by Aaron on topic Re: Extra field values - ordering
you can order them in the admin side.. go to extra fields click on the word "order" at the top of the column and then select whichever order you need.

You will not be able to change the ID of the extra field through ordering. Those are written in the database and are unique IDs for the field.


Aaron :)

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

More
13 years 1 month ago #63374 by Ania
Replied by Ania on topic Re: Extra field values - ordering
Yes, I know I can order extra fields this way but what I need to do is to order the default values of an extra field. Is it possible ?

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

  • Andrey Miasoedov
  • Andrey Miasoedov's Avatar
  • Offline
  • Senior Member
More
13 years 1 month ago #63375 by Andrey Miasoedov
Replied by Andrey Miasoedov on topic Re: Extra field values - ordering
Ania,

The default values ordering should not be affected in ordering by extrafields or what problems you are experiencing?

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

More
12 years 11 months ago #63376 by Janette Tilley
Replied by Janette Tilley on topic Re: Extra field values - ordering
I have exactly the same problem--no one can help?
Essentially, it seems, you need to know all the possible values of your content first to create the default list. This doesn't allow the possibility of growth or change over time which seems counterproductive.
This is especially important if using the extra fields search and filter extension: the frontend user will see a drop-down list that is not in any logical order.
Is this just a limit of the K2 extra fields??

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

More
12 years 11 months ago #63377 by Altjon Kodra
Replied by Altjon Kodra on topic Re: Extra field values - ordering
I have the same problem!!! I think this is really a HUGE limit to K2 extrafields.

I have a list with 300 names alphabeticlly ordered and if I want to add a new name that starts with A... think about it!!!

The only option is to DELETE all 300 names and write everything from scratch, NO GOOD!

Please somebody help with this, it should be possible to re-order values in the extrafields.

Thanks

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

More
12 years 8 months ago #63378 by Andrew
Replied by Andrew on topic Re: Extra field values - ordering
+1 to that, ordering default values would be a huge improvement.

Like a Drupal taxomony list of terms.

An automatic alphabetical/numerical resort would be an improvement, so you don't have to delete every item to get back to the A's.

Easy enough to re-sort in phpmyadmin but don't think too many clients would be happy with that!

A

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

More
12 years 2 months ago #63379 by Kelsey Brookes
Replied by Kelsey Brookes on topic Re: Extra field values - ordering
Has there been any kind of solution to this?

I've got a very long list of extra field options in a multi-select with no discernable order due to the nature of the field's growth.

Deleting and re-adding is not an option.

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

More
12 years 2 months ago #63380 by Jonas Reggelin
Replied by Jonas Reggelin on topic Re: Extra field values - ordering
Can noebody help?

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

More
12 years 2 months ago #63381 by Marco van der Ziel
Replied by Marco van der Ziel on topic Re: Extra field values - ordering
I think this is not possible. Maybe they can put this option in a newer version of K2. It's not do-able to remove all items first to place a new option.

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

More
12 years 2 weeks 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
12 years 6 days ago - 12 years 6 days 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
12 years 6 days 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 11 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
11 years 4 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
11 years 3 weeks 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 8 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 8 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 8 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 8 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