PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Post Tags - Auto Populate/Content Template?

  1. Gil Namur
    Member

    Hello!

    I am having trouble figuring this out.

    I want to populate the Post Tags using a Content Template such as
    {Your Name (First):x.x} {Your Name (Last):x.x}
    Cant figure it out.
    OR
    I could use a Custom Field but what should the Custom Field Name Be?
    _post_tag ??

    Thanks and cheers,
    Gil

    Posted 11 years ago on Saturday July 28, 2012 | Permalink
  2. Can you explain exactly what you want to do? Do you mean that you want to create post tags or the author's first name, last name, etc? Or is there more to it?

    Are you creating posts from your form submissions? Do you have an example online now?

    Posted 11 years ago on Sunday July 29, 2012 | Permalink
  3. Gil Namur
    Member

    Hi Chris,
    I am capturing the First Name / Last Name in the form.
    I want that {Your Name (First):x.x} {Your Name (Last):x.x} (eg Bob Smith) to be tag.

    Yes, I am creating posts and have been for 2 years. I use custom fields for Genesis SEO data
    custom title ( _genesis_title ) description (_genesis_description) keywords (_genesis_keywords)

    All I want to do is take the First Name / Last Name and make that be a tag.

    Cheers,

    Gil

    Posted 11 years ago on Sunday July 29, 2012 | Permalink
  4. Tag, as in post tag, or meta tag, like meta keyword, for SEO. I just want to make sure I get it right. Thanks Gil, and nice to see you around still.

    Posted 11 years ago on Sunday July 29, 2012 | Permalink
  5. Gil Namur
    Member

    Hi Chris,

    Thanks! Still around for sure and glad you are too!

    Post Tags ... not Keywords.
    Cheers,
    Gil

    Posted 11 years ago on Sunday July 29, 2012 | Permalink
  6. Gil, I am working on this solution for you and will post it Thursday or Friday. I ran into a couple snags in what should be pretty straightforward. Thanks for hanging in there.

    Posted 11 years ago on Thursday August 2, 2012 | Permalink
  7. Gil Namur
    Member

    Thanks Chris :-)

    Posted 11 years ago on Wednesday August 8, 2012 | Permalink
  8. Gil, take a look at this code.

    http://pastebin.com/gfGcqdzp

    You will have to change the "15" to your form ID, and change the input_6_3 and input_6_6 to the IDs for your first and last name fields. If your name field is 3, then first name is input_3_3 and last name is input_3_6. Be sure to use underscores here.

    Try that out and see if it works for you.

    Posted 11 years ago on Friday August 10, 2012 | Permalink
  9. Gil Namur
    Member

    Thanks Chris!

    I'll give it a shot in the next few days and let you know how it worked.

    Cheers,
    Gil

    Posted 11 years ago on Wednesday August 15, 2012 | Permalink
  10. Hi, Gil: I had the same issue, but used your code and it worked beautifully. But there is something strange going on with the Tags field.

    When you first choose the Tags field for your form, "Create content template" is nowhere to be seen. But then if you choose a different field type such as "Drop Down", then go back to the default field type "Single line text", suddenly the "Create content template" checkbox is there. If you check it off and put some field merges in, it doesn't work anyway. But just thought I would direct your attention to this weird bug.

    Posted 11 years ago on Thursday August 30, 2012 | Permalink
  11. jojobo
    Member

    Hi, I'm trying to use your code to accomplish something a bit different.

    I have users enter tags via checkbox.
    Later, I have them enter a price via a drop down.

    What I'd like to do is add the price as a tag to the tags already chosen.

    When I tried to tweak the code you posted I couldn't manage to call the post tags and have them added to the "tags_input" command.

    Tags: Checkbox 1, checkbox 2, checkbox 3.

    How to add: Checkbox 1, checkbox 2, checkbox 3, dropdown 1.

    Posted 11 years ago on Friday January 4, 2013 | Permalink
  12. What code are you using now, and can you share a link to the page where you form is embedded?

    Basically, on line 8:

    'tags_input' => array(rgpost('input_6_3'), rgpost('input_6_6'))

    you need to add the input ID of your drop down. I have not seen your form so I am not sure how to reference that.

    One thing which is helpful in determining how to address all the form field values is to dump the entry object. You can use the same hook, the gform_after_submission hook. Use var_dump($entry) or print_r($entry) and take a look at where the value of your select box is stored.

    Posted 11 years ago on Sunday January 6, 2013 | Permalink