Custom Fields
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
  • #2894


    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)
    '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
  • #2904

    Anh Tran

    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.