Need to have colon : in a custom select field - Escaping characters?

Support Meta Box AIO Need to have colon : in a custom select field - Escaping characters?Resolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #47930
    SebastianSebastian
    Participant

    I'm creating a site where the user will be picking what assignments each and one has. For ease of use I've chosen to go with select elements.
    The problem here is that many times the assignments are actual company names that has colons in the name, making this a problem since colon is used to separate Label:value, making this quite a deal breaker.

    So, I've searched and found nothing about escaping characters used in a select field, but I assume there are options for this?

    Thank you

    #47931
    SebastianSebastian
    Participant

    Ok, I figured it out myself. You just need to write it in hex : and it prints just like it should 😊

    #47933
    SebastianSebastian
    Participant

    I put the hex inside code tags and believed it would render the hex code but it didn't. So another try here :

    #47934
    SebastianSebastian
    Participant

    I give up. Look for colon as hex if you run in to the same problem.

    #47940
    PeterPeter
    Moderator

    Hello,

    If you use the builder to create the custom field, you need to use the format value: Label for the select option. For the label, you can add any characters there. For example:

    red1: Red: 1
    red2: Red: 2
    red3: Red: 3

    Please check this screenshot https://imgur.com/eVoleqB

    #47949
    SebastianSebastian
    Participant

    Oh right! Didn't think of that 🙂 Thanks!!

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