ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Comment form not showing up

July 29, 2014 10:41pm

Subscribe [2]
  • #1 / Jul 29, 2014 10:41pm

    garyb

    23 posts

    the code is almost exactly like in the docs. It is not showing up. Do I need to add an entry_id or am I missing something else?

    {exp:comment:form channel="blog" preview="blog/preview"}
         {if logged_out}
           
             <label for="name">Name</label>
    
             <input type="text" name="name" value="{name}" id="name">
          
          
             <label for="email">Email Address</label>
    
             <input type="text" name="email" value="{email}" id="email">
          
          
             <label for="comment">Comment</label>
    
             <textarea name="comment" rows="10%" cols="40%" id="comment">
                {comment}
             </textarea>
          
          {/if}
          
             {if captcha}
             <label for="captcha">Please enter the word you see in the
             image below:</label>
    
          
          
             {captcha}
    
              <input type="text" name="captcha" value="{captcha_word}">
          
             {/if}
          
             <input type="submit" name="submit" value="Submit">
          
         {/exp:comment:form}
  • #2 / Aug 05, 2014 3:20pm

    garyb

    23 posts

    Lets try this again. I created a comment entry form. And it show up like it should but when I replace the form tags with

    {exp:comment:form} and {/exp:comment:form}

    the form disappears. Someone must of run into this before.

  • #3 / Aug 07, 2014 11:54am

    Kurt Deutscher

    827 posts

    Is commenting turned on in the channel preferences?

    Is it allowed for the entry you are testing with? (checkbox in the Options tab of the entry)

    What’s the full URI of the page where the from should be displaying?

  • #4 / Aug 08, 2014 12:44am

    garyb

    23 posts

    Yes to both questions. The page url is /index.php/blog/blog. It is the same page as the articles itself.  When I look at the source the div is empty.

  • #5 / Aug 08, 2014 1:45am

    Kurt Deutscher

    827 posts

    Ah.. OK, it’t the URI that need some help.

    EE has two kinds of pages, multi-entry pages, and single-entry pages. By default, the comment form only works on the single-entry pages of the site:  https://ellislab.com/expressionengine/user-guide/add-ons/comment/#comment-submission-form

    Your URI is for a multi-entry page, so the form won’t display there.

    You’ll either need a URI that includes the Entry_ID number of your entry, or some how pass the Entry_ID number to the form using an embed or something.

    You’ll likely need a URI something like:

    /index.php/blog/category_name/123

    Basically it ends with the entry ID number.

    This might help if you are new to EE:

    https://ellislab.com/expressionengine/user-guide/urls/url_structure.html#entries-and-other-things

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases