Support » Plugin: Pods - Custom Content Types and Fields » Relationship field – customise the display text

  • Resolved mondocongo

    (@mondocongo)


    I have an “appointments” post type which has a relationship field linked to the post type “providers” – providers doesn’t use a WordPress ‘title’ field.

    When creating an appointment, the providers all display as ‘Auto draft’ in the select list.

    Is there a way to override the display text when in a select list? I have already overridden “the_title()”, however this doesn’t seem to have an effect on the select list representation.

    I’m using the latest version of Pods 2.

    http://wordpress.org/extend/plugins/pods/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    I’m adding a new filter into Pods 2.0.5 which should get committed today or tomorrow.

    The filter is called “pods_field_pick_data” and it passes 6 variables:

    $data = the array of key / value pairs for display
    $name = the field input name
    $value = the current field value
    $options = the field data and options
    $pod = the Pod object (if passed to the field method)
    $id = the Pod item ID (if passed to the field method)

    We’re also working on a new option that will let you customize which field is shown for the title on relationship fields, that may or may not be ready for 2.0.5 in time.

    Awesome… just updated to 2.0.5-b-3 and hooked it up.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Relationship field – customise the display text’ is closed to new replies.