Support » Plugin: Gravity Forms + Custom Post Types » Can i either A) remove dashes from taxonomy dropdown, or B) map text to taxonomy

  • I have installed the custom post & taxonomy add on (it’s great thanks), but one little problem.

    I want to be able to use the item selected from the drop down as an actual word in other places in the form (ie in SEO fields, and in some other custom fields). But when someone selects one of the sub-items from the taxonomy drop down, the “–” come with it.

    So i’d like to either A) be able to get rid of those dashes, or B (preferably), can someone please tell me how I can map a normal drop down field or check box to a taxonomy (including sub-menu taxonomy items), thanks.

    If that’s not completely clear an example of how the taxonomy list is:

    Clothing
    –shirt
    –dress
    –top
    SHOES
    –heels

    etc..

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bradvin

    (@bradvin)

    you can remove the “–” dashes by editing the file :

    gfcaddonbase.php

    comment out line 161:

    $item->name = str_repeat(‘–‘, $level) . $item->name;

    so you end up with

    //$item->name = str_repeat(‘–‘, $level) . $item->name;

    Plugin Author bradvin

    (@bradvin)

    Just want to clarify:

    are you saving the form to a post type? Because the “–” are only visual to show the hierarchy in the form. Behind the scenes, the id of the term is saved. Or if you create a post, then the post is automatically linked to the taxonomy term.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can i either A) remove dashes from taxonomy dropdown, or B) map text to taxonomy’ is closed to new replies.