• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: CGFeedback comments not uploading from News Detail page
PostPosted: Thu Sep 27, 2018 10:37 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Aug 29, 2007 4:36 am
Posts: 241
Location: Sydney Australia
I have installed the latest CMSMS 2.2.8 and the latest CGFeedback 2.2.

I have included {CGFeedback key1="News" key2=$entry->id} in my News Detail page with default templates.

I made sure {cge_form_csrf} was in the template after the form_start tag.

Comments are not being uploaded and an error message saying "You must provide your name" appears.
The name was input into the comment form, but it is not being recognized.
In settings the Name field is required by default.

I've included the default CGFeedback comment form template below, in case someone can spot a problem I'm not seeing:
Code:
{* comment form template *}
{if isset($message)}
  <div class="pagemessage">{$message}</div>
{else}
  {* no message... display the form *}
  <div class="cgfeedback_addcomment">
  {if isset($error)}
     <div class="error">{$error}</div>
  {/if}

  {form_start action=default inline=$inline extraparms=$extraparms}{cge_form_csrf}
  {*
   * A simple honeypot captcha field.  This field needs to be a text field, but hidden with CSS
   * deleting this field from the template will have no effect on form behavior, but if this
   * field exists, and is populated an error will be generated.
   *}
  <input type="text" name="{$actionid}feedback__data" value="" style="display: none;"/>
  <fieldset style="margin: 1em;">
  <legend>&nbsp;{$mod->Lang('prompt_add_comment')}&nbsp;</legend>

  <div class="row">
    <div class="col-md-4 text-right">
       <label for="{$actionid}title">{$mod->Lang('prompt_title')}:</label>
    </div>
    <div class="col-md-8">
      <input type="text" id="{$actionid}title" name="{$actionid}title" size="80" maxlength="255" value="{$comment_obj->title}"/>
    </div>
  </div>

  <div class="row">
    <div class="col-md-4 text-right">
       <label for="{$actionid}author_name">*{$mod->Lang('prompt_your_name')}:</label>
    </div>
    <div class="col-md-8">
      <input type="text" id="{$actionid}author_name" name="{$actionid}author_name" size="40" maxlength="255" value="{$comment_obj->author_name}" required/>
    </div>
  </div>

  <div class="row">
    <div class="col-md-4 text-right">
       <label for="{$actionid}author_email">{$mod->Lang('prompt_your_email')}:</label>
    </div>
    <div class="col-md-8">
      <input type="email" id="{$actionid}author_email" name="{$actionid}author_email" size="40" maxlength="255" value="{$comment_obj->author_email}"/>
    </div>
  </div>

  <div class="row">
    <div class="col-md-4 text-right"></div>
    <div class="col-md-8">
      <label> <input type="checkbox" name="{$actionid}author_notify" value="1" {if $comment_obj->author_notify == 1}checked{/if}/> {$mod->Lang('prompt_notify')}</label>
    </div>
  </div>

  <div class="row">
    <div class="col-md-4 text-right">
       <label for="{$actionid}rating">{$mod->Lang('prompt_your_rating')}:</label>
    </div>
    <div class="col-md-8">
      <select id="{$actionid}rating" name="{$actionid}rating">
        {html_options options=$rating_options selected=$comment_obj->rating}
      </select>
    </div>
  </div>

  <div class="row">
    <div class="col-md-4 text-right">
       <label for="{$actionid}comment">{$mod->Lang('prompt_comment')}:</label>
    </div>
    <div class="col-md-8">
      {cge_textarea wysiwyg=$wysiwyg name="{$actionid}comment" id="{$actionid}comment" rows=3 value=$comment_obj->data}
    </div>
  </div>

  {* custom fields *}
  {if isset($fields)}
    {foreach $fields as $fieldid => $field}
      {$_id="{$actionid}field_{$fieldid}"}
      <div class="row">
        <div class="col-md-4 text-right">
          <label for="{$_id}">{$field.name}:</label>
        </div>
        <div class="col-md-8">
          {if $field.type == 0 or $field.type == 1 }
            <input type="text" name="{$actionid}field_{$fieldid}" value="{$field.value|default:''}" size="{$field.attrib.length}" maxlength="{$field.attrib.maxlength}"/>
          {elseif $field.type == 2}
            {cge_textarea wysiwyg=$field.attrib.usewysiwyg|default:0 rows=3 id="{$_id}" name="{$actionid}field_{$fieldid}" value=$field.value|default:''}
          {elseif $field.type == 3}
            <select name="{$actionid}field_{$fieldid}">
              {html_options options=$field.attrib.options selected="{$field.value}"}
            </select>
          {elseif $field.type == 4}
            <select multiple="multiple" size="4" name="{$actionid}field_{$fieldid}[]">
              {html_options options=$field.attrib.options selected="{$field.value}"}
            </select>
       {elseif isset($field.input)}
            {$field.input}
          {/if}
        </div>
      </div>
    {/foreach}
  {/if}

  {if isset($captcha_img)}
    {* handle captcha image *}
    <div class="row">
      <div class="col-md-4 text-right"><label for="{$actionid}captchatext">{$mod->Lang('prompt_captcha')}:</label></div>
      <div class="col-md-8">
        {if $captcha_needs_input}
        <input type="text" class="form-control" id="{$actionid}captchatext" name="{$actionid}feedback_captcha" value="" size="20"/><br/>
   {/if}
        {$captcha_img}
      </div>
    </div>
  {/if}

  <div class="row">
    <div class="col-md-4 text-right"></div>
    <div class="col-md-8">
      <button class="btn btn-active" name="{$actionid}cgfb_submit">{$mod->Lang('submit')}</button>
    </div>
  </div>

  </fieldset>
  {form_end}
  </div>
{/if}{* message *}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting