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.

Problem with Post title template

  1. latamconnect
    Member

    Hi everyone,

    I've searched the forums/docs but couldn't find this anywhere. Here's the problem:

    My form creates new posts. The post title is a combination of two single-text fields (one is for first name, the other for last name).

    Now the problem is that I've been asked to add a comma between the two. This is what I've tried:

    - Adding a comma between the two form fields - ie: {field1}, {field2}

    - Adding a hidden field with a value of ", " and adding it to the title template

    - Adding a single-text field (only visible to admin) with a value of ", " and adding it to the title template

    - Also tried with something else other than a comma, just in case it was a problem with this character

    Nothing has worked so far. My posts' titles have only a comma in it, same for the slug and email notifications. Somehow the other form fields just aren't there.

    I have the latest GF and WP versions.

    If anyone could help, I would really appreciate it.

    Thanks in advance!

    Posted 13 years ago on Monday October 11, 2010 | Permalink
  2. Use our Contact Us form to send us a WordPress admin login for this site and let us know which form it is and we can take a look. Be sure to reference this forum post in your Contact Us request.

    Posted 13 years ago on Monday October 11, 2010 | Permalink
  3. The issue is you made changes to your form after you created the Post Title template which can impact the form field id's, especially when re-ordering your form.

    I updated the form field variables and it is working now.

    You had:
    {Last Name:7}{First Name:6}

    Re-inserted form field values:
    {Last Name:11}, {First Name:12}

    The variables you had were no longer good because you made changes to your form. So you should only do the post related templates once your form is updated and you need to be sure if you make changes to your form that you make sure the form field variables are still valid.

    Posted 13 years ago on Monday October 11, 2010 | Permalink
  4. Hi,

    I am perhaps having the same problem and wanted to first make sure that I am using the post title template correctly. This is a very simple tweak I am doing, so should be a no brainer for you...

    I am creating a form for users to submit draft posts to my blog. I want the title of the form to be invisible and to populate automatically with the same content from a custom field that is also on the same form. This custom field value is filled out by the person who is posting.

    The Custom Field Key is "English". On my Gravity Form I have checked "Create Post title template" and used the drop down to choose "English". The value {English:4} populated in the text box below the drop down.

    I tried submitting a test form and the title of the form didn't populate. Instead it read "Untitled". I then pasted {English:4} in the "Default Value" field and/or the "Allow field to be populated dynamically" field of the Gravity Form without success.

    So, in short, can you tell me the proper configuration for populating the form title with the same content from a Custom Field that is also on the same form?

    Thanks a lot!

    Paul

    Posted 13 years ago on Monday October 18, 2010 | Permalink
  5. If you populated the custom field variable in the post title and then made additional changes to your form then {English:4} may no longer be valid, it may have changed to something like {English:6} or something like that. The number if an id, and depending on changes you make on your form this value could have changed. I would suggest getting the form exactly how you want it, and THEN setup your Post Title Content Template by using the insert field variable again. Insert that field variable again and see if it changed, i fit did then that is what was going on.

    Posted 13 years ago on Monday October 18, 2010 | Permalink
  6. Thanks Carl. This is working now. I did notice that {English: 1} changed to {English: 4} when I was editing the form, but that was before I wrote the above post, so perhaps It was working when I posted but just failed to take notice!? One other thing I did was to clear my browser's cache. Perhaps this was this issue. Either way, it is working now.

    So, for the benefit of future readers I will summarize:

    In order to automatically populate the title of a post with the content from a custom field that is also on the same form, simply check the "Create Post title template" and in the "Insert form field" drop down choose the name of the field that has the content you want to appear in the title. In my case, {English: 4} appeared in the text box beneath the drop down. No other settings under the advanced tab are necessary.

    As Carl says, get the form exactly how you want it, and the do the above steps. Also, you may want to clear your browser's cache if the above steps are not yielding results.

    ********* A quick follow on question on the same topic**********

    Now that my form titles in my posts are populating nicely, I noticed in the Admin area under Forms --> Entries, that the Title is NOT populated. I don't mind this since my objective was to populate the form title of posts, but just curious if this is expected behavior??

    Thanks again,

    Paul

    Posted 13 years ago on Tuesday October 19, 2010 | Permalink
  7. The Title should be populated, we will try to recreate it on our end. It could be a bug related to the Post Title Content Template functionality.

    Posted 13 years ago on Tuesday October 19, 2010 | Permalink