Binding by a function / return value

Support MB Geolocation Binding by a function / return value

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2894
    SinusiteSinusite
    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 !

    #2904
    Anh TranAnh 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 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Binding by a function / return value’ is closed to new replies.