patricktsg Posted April 6, 2020 Share Posted April 6, 2020 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 More sharing options...
patricktsg Posted April 8, 2020 Author Share Posted April 8, 2020 Can anyone help on this? I've tried all I can think of to no avail. Link to comment Share on other sites More sharing options...
Robin S Posted April 9, 2020 Share Posted April 9, 2020 It works out of the box for me. Are you including the CSS and JS as per the implementation notes? Link to comment Share on other sites More sharing options...
patricktsg Posted April 17, 2020 Author Share Posted April 17, 2020 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 1 Link to comment Share on other sites More sharing options...
Robin S Posted April 18, 2020 Share Posted April 18, 2020 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 More sharing options...
JeevanisM Posted May 16, 2020 Share Posted May 16, 2020 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... Link to comment Share on other sites More sharing options...
JeevanisM Posted June 22, 2020 Share Posted June 22, 2020 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 The star option is enabled in admin section as well 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 More sharing options...
johndoe Posted June 22, 2020 Share Posted June 22, 2020 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now