PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

GD Star Rating vote field

  1. Hi there,

    I am using the GD Star Rating plugin on a site of mine and I would really love to have users submit their own reviews. Everything is fine except I can't figure out how they can submit their star rating from a form field?

    Any help would be much appreciated - I'm so close but so far!

    Many thanks,

    Cam

    Posted 12 years ago on Tuesday July 31, 2012 | Permalink
  2. Do you have an example of what you've done so far? URL please?

    Posted 12 years ago on Tuesday July 31, 2012 | Permalink
  3. Sorry, yes:

    http://www.clikaclinic.com/add-a-review/

    The vote part just supplies their vote to me as text in the email - but I'd like it to register their vote with the post they are creating - possible?

    Many thanks for your help :)

    Posted 12 years ago on Tuesday July 31, 2012 | Permalink
  4. That site timed out before it loaded for me:
    http://www.clikaclinic.com/add-a-review/

    Posted 12 years ago on Tuesday July 31, 2012 | Permalink
  5. Sorry - had problems with the hosting so have moved hosts now - should be fine if you go again, if you email me I will send you a login as the add a review page is for registered users only...

    Many thanks

    Cam

    Posted 12 years ago on Wednesday August 1, 2012 | Permalink
  6. Please send me the login information at chris@rocketgenius.com - thank you.

    Posted 12 years ago on Wednesday August 1, 2012 | Permalink
  7. Your login should be with you now... thanks so much for looking at this for me :)

    Posted 12 years ago on Wednesday August 1, 2012 | Permalink
  8. Hi Chris, did you have chance to look at this for me? I was just wondering if we should include another "after_submission" hook for this? But I can't work out how the GD Star Rating plugin assigns it's star ratings... if you would like admin access I can grant you it - your user is a contributor at the mo.

    If you look at my sample review here below you'll see the star rating in action (only allows one vote per user:

    http://www.clikaclinic.com/review/bupa-crom/

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  9. Hi again, if you could look at this for me it would be really appreciated as I really need to get this sorted today!

    Many many thanks for your help...

    Cam

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  10. Please do give me admin access so I can take a look. I have the login already.

    Seems to me we need to figure out how the GD Star Rating plugin stores the rating (in the wp_postmeta table maybe.) If that's the case, we need to use a custom field in Gravity Forms and ensure that the key is the same, and the format of what is stored is the same. That way, when the rating is selected in the form, the key and value will be stored in a format the GD Star Rating plugin is familiar with, and GD Star Ratings plugin takes it from there.

    I may need database access as well, to see how the plugin is storing the rating information. Please send that to chris@rocketgenius.com (either cpanel for the site, or phpMyAdmin) - thanks

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  11. No probs, I've just emailed you the details and given you admin access.

    Thanks so much Chris, you rock...

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  12. It's a little more complicated than I thought. The GDSR plugin uses its own tables to store the votes. I think the best approach is to record the votes in the plugin tables using the plugin's functions, if possible. I guess we have to read the value submitted in the form, then assemble all the information which is stored as a vote, and record that.

    I'm wondering though: can you just insert the GDSR shortcode into an HTML block in the form, so people can just rate the post that way? Or does that not work, because the form is not on the actual page which holds the post? Can you give me a pair of URLs: the post which will display the aggregate rating, and the form which allows visitors to rate that post (i.e. clinic)? Thanks

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  13. Or, are posts created on the fly when the review is submitted the first time? And then the one rating is displayed on the post, and other visitors can rate that as well? So there is one rating form, the form creates a post, and the post should display the rating using the GDSR plugin, with the value that was selected from the drop down? Accurate?

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  14. I'm not sure if the HTML rating block on the form will work as the post isn't created yet - then again, the form has a post ID assigned before it is submitted right? So may work...

    How would I get the short code into the form? If I just put it under the form short code on the page then the vote will be for the "add a review" page rather than the new post...

    I'm a little confused by which two URLs you are after but an example unrated post is here:

    http://www.clikaclinic.com/review/a-clinic-in-devon-2/
    careful there as once your vote is submitted you can't vote again due to IP tracing (I can always make more unrated posts though of course if you need)

    This is the only place users can do their voting as far as I know (i.e. on the review page itself).

    Thanks so much for looking at this for me Chris...

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  15. I think I figured it out in my previous response. The post is created and rated at the same time, with the first submission. So the rating is done first from the drop down, and you want to use that value to give the post its first rating, correct? Then it proceeds as normal with GDSR ratings, from unique IPs, correct?

    I am looking at it now and we'll see how far I can get with it.

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  16. Yep that would be perfect - thanks so much Chris :)

    Posted 12 years ago on Friday August 3, 2012 | Permalink
  17. Hi Chris, I know it's early where you are - just posting this for when you get in... Did you have any joy with the rating integration? I can't stress enough how grateful I am for your help with this.

    Kind regards,

    Cam

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  18. I got into the joy already. I will post something for you about 14 hours from now. You're my last project from the weekend. We'll get it done. Thanks for hanging in there.

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  19. Thanks Chris - sounds like you're working a long day?!

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  20. Nah - just won't have time to post it before then. Play day today :-) Cheers

    Posted 12 years ago on Monday August 6, 2012 | Permalink
  21. Morning Chris - I'm just checking in really... hope your play day was as good as it's name suggests!

    Cheers,

    Cam

    Posted 12 years ago on Tuesday August 7, 2012 | Permalink
  22. Hi Chris, sorry to pester you - but you don't have a solution do you? My deadline is in half an hour so if not I'm in trouble!

    Thanks again,

    Cam

    Posted 12 years ago on Tuesday August 7, 2012 | Permalink
  23. Go ahead and submit this test form. Keep track of your rating. Then click the link in the text confirmation to view your review/post and see if the rating is there. Feel free to submit multiple times: http://gravity.chrishajer.com/post-68717/

    Here is the code to add to functions.php in your theme:
    http://pastebin.com/67XJN28C

    That is for form 1, and where the rating drop down is field #3. Those values are correct for your form. If you use this elsewhere, please change those values.

    Let me know how it goes. Thanks.

    Posted 12 years ago on Tuesday August 7, 2012 | Permalink
  24. That is totally awesome! Thanks so so much Chris you are a saint!

    Posted 12 years ago on Tuesday August 7, 2012 | Permalink
  25. Glad that worked out for you. I hope the code is useful for someone else who wants to integrate the GD Star Rating plugin. Thanks for the update.

    Posted 12 years ago on Tuesday August 7, 2012 | Permalink
  26. enclave
    Member

    Hi Chris,

    Does the embedding the GDSR shortcode on the HTML block solve the problem in the first place?

    And do you have example file (GF xml) and can you please allow people to register at the demo site to test the one you created. cheers!

    Posted 12 years ago on Saturday September 29, 2012 | Permalink
  27. Here is the XML of the form: http://pastebin.com/PbRt3Jqi

    Click the raw or download link, save the file as form.xml, then import that into your Gravity Forms installation. There is a lot of specific URL stuff there for various sites; be sure to change all that if you actually want to submit the form.

    I removed the registration requirement. Not sure why I had that :-)

    I'm not sure I understand the question about the HTML block.

    Posted 12 years ago on Monday October 1, 2012 | Permalink
  28. Thank you for this! Worked perfectly in my application.

    Posted 11 years ago on Sunday January 6, 2013 | Permalink
  29. I'm glad this post helped you. Thank you for posting.

    Posted 11 years ago on Monday January 7, 2013 | Permalink