Need review form
This topic contains 5 replies, has 2 voices, and was last updated by Kor 7 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
October 26, 2018 at 2:10 pm #451331
I want to add the review form to a pop up. How can I display just the form? I don’t need help with the popup just getting the form to add to it.
October 26, 2018 at 3:29 pm #451345Hi James,
Do you mean you want to display the “Review form” from the review tab into a popup? If not, could you elaborate with some screenshots?
Thanks!
October 26, 2018 at 3:30 pm #451346That is exactly what I want to do.
October 26, 2018 at 4:36 pm #451356Hi James,
Unfortunately, that wouldn’t be possible without customization. You can always reach out some of our Gd experts here http://geodirectoryexperts.com/ for customization services.
Thanks!
October 26, 2018 at 5:46 pm #451365Sure thing.
Here is a solution for anyone who wants to do this in the future. This is using bootstrap 3 modal.
The link<a data-toggle="modal" data-target="#reviewModal" class="jtf=info-box-link">Leave a Review</a>Add to footer.php you may need adjust your login url if it is not /login
<?php if ( get_post_type( get_the_ID() ) == 'gd_place' ) { $current_user = wp_get_current_user(); echo '<div class="modal fade" id="reviewModal" tabindex="-1" role="dialog" aria-labelledby="reviewModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="reviewModalLabel">'; the_title(); echo '</h4> </div> <div class="modal-body">'; if(is_user_logged_in()){ echo ' <form action="/wp-comments-post.php" method="post" id="commentform" class="comment-form"> <p class="logged-in-as"><a href="/wp-admin/profile.php" aria-label="Logged in as '. $current_user->display_name .' <div class="br-wrapper br-theme-fontawesome-stars"> <select class="gd-fa-rating" style="display: none;"> <option value=""></option> <option value="1">Terrible</option> <option value="2">Poor</option> <option value="3">Average</option> <option value="4">Very Good</option> <option value="5">Excellent</option> </select> </div> <input type="hidden" id="geodir_overallrating" name="geodir_overallrating" value="0"> <p class="comment-form-comment"><label for="comment">Review text <span class="required">*</span></label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" required=""></textarea></p> <p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Review"> <input type="hidden" name="comment_post_ID" value="'. $post->ID .'" id="comment_post_ID"> <input type="hidden" name="comment_parent" id="comment_parent" value="0"> </p> <input type="hidden" id="_wp_unfiltered_html_comment_disabled" name="_wp_unfiltered_html_comment" value="4ff31c56bd"> </form>'; }else{ echo '<p> You need to be logged in to leave a review <a href="/login/?redirect_to='.get_the_permalink($post->ID).'">Login Now</a> </p>'; } echo '</div> </div> </div> </div>'; } ?>October 27, 2018 at 4:23 pm #451485Hi James,
Thank you very much for sharing the solution. Really appreciate it.
Thanks!
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket