• So I have set up a post form for certain roles to be able to post directly, the fields all work except the tag selection, I choose the tags from the selection list, but when I view the post itself, there are no tags added..

    The only option I see on the mapping settings are:
    “Post Tags” under Custom Taxonomy, which I selected, but I do not see the dynamic_select to choose from, just “hook with a filter”.

    I tried copying the helper trigger code beside it, but no luck.

    Any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    but I do not see the dynamic_select to choose from, just “hook with a filter”.

    indeed, dynamic_select are not mappable to taxonomies. This is because potentially the dynamic_select can be modified by the user and the plugin would have no control to ensure selected values are existing terms.

    Use the default select and leave the options empty. Once you map it to a taxonomy, the plugin will fill in the terms automatically.

    Thread Starter zavakz

    (@zavakz)

    Thanks – that worked, but I require the user to be able to add new tag codes. Is that not possible?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I require the user to be able to add new tag codes

    what do you mean? are you saying you want users to be able to add new terms to a mapped taxonomy?

    Thread Starter zavakz

    (@zavakz)

    Sorry if I was not clear.

    So a user would select a certain category, but may want to add a tag to the post. That tag may not exist so I thought they could add it when selecting tags.

    For example a category called “Asian Cities”, the user may want to be more specific and add the city as a tag “#hongkong” etc. Just like below you are able to add tags to your reply to this post separating by commas.

    • This reply was modified 3 years, 9 months ago by zavakz.
    Plugin Author Aurovrata Venet

    (@aurovrata)

    got it. Indeed Post Category/ Post Tag are taxonomies, categories/tags are called terms. Should you come across FAQs/filters talking about taxonomies/terms then keep in mind that they apply to existing categories/tags or custom taxonomies.

    Yes, it’s possible. One way to do it is using the step outlined in FAQ #8.

    If you are using the Smart Grid-layout extension (another of my plugin for CF7), then you can also

    1. either use a dynamic dropdown like in your first attempt, but you will need to do the mapping to the taxonomy (tag) yourself using the action fired at the end of the mapping process cf7_2_post_form_posted, you can get a helper code from the post-form submit list of hooks and filters in the map edit page.

    2. use a normal select tag which can be mapped to a taxonomy and enable the select2 functionality on this field,

    [select post-tag-field multiple class:select2 class:tags]

    you will however need to select the filter option to map the field, and map the submitted values to the post tag terms, creating new ones if need be.

    In the next version of this plugin I will improve this functionality to make it easier to accomplish this without the use of filters.

    Thread Starter zavakz

    (@zavakz)

    Thanks.

    If you are using the Smart Grid-layout extension (another of my plugin for CF7), then you can also

    Yes I am.

    So I committed to doing the first method you suggested (as I think it looks and acts better), but my tags still do not appear on the posts, I know I am doing something wrong. Although the new tags are being created so I am missing something somewhere.

    My tag box shortcode:
    [dynamic_select addposttags multiple class:select2 class:tags "slug:post_tag"]

    In functions.php I’ve added:

    “filter:cf7_2_post_filter-post_tag” code snippet

    Also added Taxonomy Registration Filter (3) and Action (16), but I’m not sure what to put in the action “//do something.” line.

    Is it?
    do_action('cf7_2_post_form_posted', $post_id, $this->cf7_key, $this->post_map_fields, $this->post_map_meta_fields, $cf7_form_data, $submission->uploaded_files());

    Can you expand on how to do cf7_2_post_form_posted or the step in a bit more detail please?

    Here’s my map settings if I’ve not been clear above.

    View post on imgur.com

    The form looks like:

    View post on imgur.com

    Plugin Author Aurovrata Venet

    (@aurovrata)

    Is it?

    no

    In functions.php I’ve added:

    “filter:cf7_2_post_filter-post_tag” code snippet

    No, you’re supposed to click on the filter link to copy the helper code which you can use in your functions.php file.

    You are mixing together the 2 different ways I explained in my previous post.

    You need to read it again, its either step 1 or step 2, not both.

    Can you expand on how to do cf7_2_post_form_posted or the step in a bit more detail please?

    this is an action fired when the a submitted form fields have been saved into a new post in the backend. It gives you access to the post (using its ID), so you can now add more parameters to your post…such as saving custom terms into the post_tag taxonomy and assigning those the post. This is more complex and requires coding skills and WP framework understanding. So if you are not familiar with either you need to get some help from tutorials and online forums such as StackOverflow.

    I do not provide specific code lines in the support of this plugin, you may read this post to understand.

    If you need someone to help you with coding then you will need to hire a developer or myself ??

    Thread Starter zavakz

    (@zavakz)

    No, you’re supposed to click on the filter link to copy the helper code which you can use in your functions.php file.

    That’s what I did, I was just trying to avoid posting the full codes.

    You are mixing together the 2 different ways I explained in my previous post.

    Oh, hmm, I thought I was following all said within the first step only.

    I do not provide specific code lines in the support of this plugin, you may read this post to understand.

    I see, no problems.

    If you need someone to help you with coding then you will need to hire a developer or myself ??

    Thanks for the offer. I’ve actually reached out to some but not yet received a reply, so I’ll give it some further shots and if I’m still stuck how would I be able to contact you to take your offer?

    Plugin Author Aurovrata Venet

    (@aurovrata)

    That’s what I did, I was just trying to avoid posting the full codes.

    got it, apologies.

    Thanks for the offer. I’ve actually reached out to some but not yet received a reply, so I’ll give it some further shots and if I’m still stuck how would I be able to contact you to take your offer?

    you can reach out on: vrata at syllogic dot in

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Cannot get the selected tags on the form to add to the post tags itself.’ is closed to new replies.