Jump to content
patricktsg

Comment form not showing Star input

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">',
 

Share this post


Link to post
Share on other sites

It works out of the box for me. Are you including the CSS and JS as per the implementation notes?

2020-04-09_213810.thumb.jpg.44157908aa19b3444ac796b885892e01.jpg

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...