Custom Fields
Re-Envisioned
Support General Field content sort order

  • Creator
    Topic
  • #31007
    Jim 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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #31014
    Long 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 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 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 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.