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.

Add e-mail field thatappear on post from a form

  1. Hello,

    I have a question :

    At present I am using the Post Fields - Title and Body to obtain/post the title of the post and the body content of the post from a form (due to entirely to the support from this site! - Thanks)

    I now wish to put an Enter e-mail address field on the form, so that it will appear on the post. So that when somebody fills in the e-mail address on the form, that it appears on the website/blog as a 'post' and the e-mail address entered show up on the 'post' along with the other postings - Title and Body.

    I hope I have explained this clearly... this stuff is still a bit confusing to me!

    Any assistance appreciated.

    Robbert

    Posted 13 years ago on Thursday September 1, 2011 | Permalink
  2. Include an email field in your form. Then use a content template for your post body. On the properties tab of your post body form field, you will see a check box that says "Create content template". Check that; you will create your content template in the textarea below. By default, the merge tag for the post body will be put automatically into the text area. That is the content which is submitted by the visitor into the field you set as post body. If you saved the form right now, nothing on the front end would look any different. The content template with just one field is the same as no content template at all.

    But, here's what you need to do to get the email into the post body. Use the drop down "Insert a field" to insert the email address into your post. If it were field #2 in your form, the merge tag would look like this:

    [php]
    {Email:2}

    Here is my form:
    http://gravity.chrishajer.com/story-submission/

    Here is the post I created:
    http://gravity.chrishajer.com/2011/09/02/everything-is-everything/

    This line of the post was generated by the content template:
    This story was submitted by Lauryn Hill on 09/02/2011

    Here's the content template that created the post body:

    [php]
    {Your story:4}
    
    <div class="entry-meta"><span class="sep">This story was submitted by</span> {Identify yourself (First):1.3} {Identify yourself (Last):1.6} on {date_mdy}</div>

    I used the name input and the date submitted, not the email. To use the email, if it were form field two, and your post body were field one, your content template might look like this:

    [php]
    {Post Body:1}<br style="clear:both;" />
    Submitted by: <a href="{Email:2}">{Email:2}</a><br style="clear:both;" />

    Does that help?

    Posted 13 years ago on Friday September 2, 2011 | Permalink
  3. Hi Chris,

    Thanks for the reply and information.

    I will give this a try.

    Regards,

    Robbert

    Posted 13 years ago on Friday September 2, 2011 | Permalink
  4. Please let us know if you need more help making it work.

    Posted 13 years ago on Friday September 2, 2011 | Permalink
  5. Hi Chirs,

    ABSOLUTELY BRILLIANT!!!!!

    Works perfectly.... and does exactly what I want.

    Many thanks for your assistance... to think I only stumbled upon Gravity Forms by accident and needing it as an 'extra' plug-in for a theme.

    Finding Gravity Forms, based on what I have been able to achieve within the last two days, far outweighs the cost of my theme and the gravity plug in.

    Well done.

    Robbert

    Posted 13 years ago on Friday September 2, 2011 | Permalink
  6. Very cool. Thanks for the update.

    Posted 13 years ago on Friday September 2, 2011 | Permalink

This topic has been resolved and has been closed to new replies.