Field content sort order

Support General Field content sort order

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31007
    Jim HunterJim Hunter
    Participant

    I created a custom field that will hold a value for the level of participation that a vendor has bought into. The values might be something like 'Gold' 'Silver' 'Bronze'. And the field is a select box. I created a CPT in order to associate it to the vendor so that the customer can create whatever values they want to display. I also created a field, in the CPT, called sort_order so that we can 'try' to control what order they appear in the dropdown, but I don't see any way to actually control it. WordPress simply displays them in alpha order. Is this something that I can control somehow and display them in the order I want?

    #31014
    Long NguyenLong Nguyen
    Moderator

    Hi Jim,

    Meta Box does not support sorting options of a select field based on another field value. If you are familiar with coding, you can create your own field by following this documentation https://docs.metabox.io/custom-field-type/

    #31030
    Jim HunterJim Hunter
    Participant

    Thanks,I took a look at the article and is there a way to register the new field so that it can be used from the MB Field Group UI? I have been doing some fun stuff with that and that is how I am doing my data input, using field groups.

    #31034
    Long NguyenLong Nguyen
    Moderator

    Hi Jim,

    Yes, it is possible to add a custom field type to the Builder. Please read more here https://docs.metabox.io/extensions/meta-box-builder/#extending-the-builder

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.