Custom Fields
Re-Envisioned
Support Meta Box Geolocation Binding by a function / return value

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 3 years, 2 months ago.

  • Creator
    Topic
  • #2894

    Sinusite
    Participant

    I would like to 'binding' => 'locality‘ with a 'field_type' => 'select_advanced' (taxonomy type).
    But the select options are specifics IDs and int, not strings.

    Is there a way to do someting like
    'binding' => get_term_by('name', 'locality', my_locality_taxo)
    or
    'binding' => myFunction( param:locality, return:value_of_select )
    or perhaps :

    binding => locality
    binding_value => myFunction( param:locality, return:value_of_select )

    If not, i will do that with a hidden field and some JS on change…

    Thank You !

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #2904

    Anh Tran
    Keymaster

    Hi @sinusite,

    I think it’s not possible for now. Using a raw PHP code requires running eval which is not recommended because of security matter :(.

Viewing 1 replies (of 1 total)

The topic ‘Binding by a function / return value’ is closed to new replies.