Do you mean you have something like a product page and you want to drop an Umbraco form on the page to capture a user rating?
Off the top of my head you'd probably have to do something like create a custom workflow in Forms to store the submission to a custom table where the product node id is also sent as a hidden variable. Your product page will then need to query this table and average the score to display the average rating.
If you tried to update something on the product node on each submission of the form you'll end up with a publish and history trail for each and every submission - this will quickly get out of hand not to mention you'd have to store each submission into a single field as a csv and add / update each time or add something to a nested content field.
If you think the traffic of the site is low and you can get away with storing on the product node I still think you'd need to create a custom workflow though to add and update rather than just set a value.
I'd suggest the custom table solution is safer - I don't like web users from being able to fire publish events.
Interested to hear if anyone has any alternative solutions.
Its not a product page but more like a User Survey Form which user fills up and chooses rating for asked question; How do you rate X service: values 1 to 10 (or stars )
I thought I saw a rating control for Umbraco Forms in Perplex but guess was dreaming about it.
Rating Control
Is there any Rating control for the Umbraco Forms, like from 1 to 10 or star ratings ?
How do you handle getting feedback rating in Umbraco Forms ? Would be interested to hear.
Do you mean you have something like a product page and you want to drop an Umbraco form on the page to capture a user rating?
Off the top of my head you'd probably have to do something like create a custom workflow in Forms to store the submission to a custom table where the product node id is also sent as a hidden variable. Your product page will then need to query this table and average the score to display the average rating.
If you tried to update something on the product node on each submission of the form you'll end up with a publish and history trail for each and every submission - this will quickly get out of hand not to mention you'd have to store each submission into a single field as a csv and add / update each time or add something to a nested content field.
If you think the traffic of the site is low and you can get away with storing on the product node I still think you'd need to create a custom workflow though to add and update rather than just set a value.
I'd suggest the custom table solution is safer - I don't like web users from being able to fire publish events.
Interested to hear if anyone has any alternative solutions.
Steve
As I read that back... I thought Forms is not the right solution for this. Just do a simple WebApi implementation.
A simple ajax form with the product id hidden. Will be much cleaner.
https://our.umbraco.com/documentation/reference/routing/webapi/
Hey Steve
Its not a product page but more like a User Survey Form which user fills up and chooses rating for asked question; How do you rate X service: values 1 to 10 (or stars )
I thought I saw a rating control for Umbraco Forms in Perplex but guess was dreaming about it.
Ah yes - what you have said makes sense. I've misread it. Sorry for the noise - hopefully someone else has the answer.
Hi, maybe Star Rating Property Editor will work: https://our.umbraco.com/packages/backoffice-extensions/umbracarestarrating-property-editor/
Best, Piotr
is working on a reply...