Jump to content

Comment form not showing Star input


patricktsg
 Share

Recommended Posts

I have this code in my template but it's not loading the stars. In the module CommentFrom if I comment out the check around whether it should show the stars they still not not render.

Any ideas why the stars will not show???

 

	<?php
// comments form with all options specified (these are the defaults)
echo $page->comments->renderForm(array(
    'headline' => "<h5 class='uk-modal-title'>Leave a Review</h5>",
    'successMessage' => "<p class='uk-alert-success'>Thank you, your review has been submitted.</p>",
    'errorMessage' => "<p class='uk-alert-danger'>Your reivew was not saved due to one or more errors. Please check that you have completed all fields before submitting again.</p>",
    'processInput' => true,
    'encoding' => 'UTF-8',
    'attrs' => array(
        'id' => 'CommentForm',
        'action' => './',
        'method' => 'post',
        'class' => '',
        'rows' => 5,
        'cols' => 50,
		),
	'inputWrapTag' => '<div class="uk-input">',
    'labels' => array(
        'cite' => 'Your Name',
        'email' => 'Your E-Mail',
        'text' => 'Your Review',
        'website' => 'Your Website',
        'stars' => 'Your Rating',
        'submit' => 'Submit Review',
    ),
    // the name of a field that must be set (and have any non-blank value), typically set in Javascript to keep out spammers
    // to use it, YOU must set this with a <input hidden> field from your own javascript, somewhere in the form
    'requireSecurityField' => '', // not used by default
    ));
    ?>

Even this line does not seem to work in inspector, it just shows the default p tag

    'inputWrapTag' => '<div class="uk-input">',
 

Link to comment
Share on other sites

  • 2 weeks later...
20 hours ago, patricktsg said:

Can you post your code for rendering the form.

Just what is shown in the Implementation field:

echo $page->comments->renderAll();

I suggest testing a Comments field on a clean installation of PW so you can determine that it does indeed work and then you can focus in on what might be different on your other site.

Link to comment
Share on other sites

  • 4 weeks later...
On 4/17/2020 at 3:57 PM, patricktsg said:

Can you post your code for rendering the form. I have the js and css in place but I still only see the name email and message field, never shows the website or stars if I enable them

Same effect here.... 

I confirmed that the css / js files are working fine.

still the star section is NOT  showing...

 

2020-05-16_10-37_1.png

2020-05-16_10-37.png

2020-05-16_10-38.png

Link to comment
Share on other sites

  • 1 month later...

Any updates regarding this ? 

I have to enable the star option for comments in my new project - As I mentioned in above comment, CSS+JS files are  linked correctly. 

The code to  render the comment  as :

 echo $page->videocomments->renderAll(); 
                    echo $page->videocomments->renderStars(); 

videocomments is the filed name for comments

But the stars are not showing anywhere  when we try to input the comment  ?  But  stars showing in the admin panel and also it shows when a comment is approved but just a single star only

 877714911_Screenshot_2020-06-22BhimOnlineClassRoom.png.f12d79ed5afb933659e555843057af23.png

937371564_Screenshot_2020-06-22CommentsProcessWirebhimonlineclassroomin.png.f30a5078df545413e176c427a217d285.png

 

The star option is enabled in admin section as well 548168244_Screenshot_2020-06-22EditFieldvideocommentsbhimonlineclassroomin.png.d03ec79e41ad85d57e5b0d4384382617.png

 

 

So there is no way I can display the STAR option when a comment is input. Please help 

 

thank you

Here is the  page link to enter comments / feedback 

https://www.bhimonlineclassroom.in/videos-list/protectors-of-biosphere-3/

 

 The version I am using is 

ProcessWire 3.0.158 dev © 2020 

 

Link to comment
Share on other sites

@JeevanisM Post all code from that template. Are you 100% sure you enabled stars for the field named videocomments?

Also, check your browser console, because there are errors/missing files (/js/pjax.js and /js/lazysizes.min.js) on the page that you linked. I don't think that it's related to your problem with missing stars, tho. Just a heads-up.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...