As explained here, adding custom form fields is not actively supported. Thanks for your understanding.

However, in this case I’ll give you some pointers on how to deal with multiple ratings:
/**
* Displays custom fields in the Review's "Details" metabox
* Paste this in your active theme's functions.php file.
* @return array
*/
add_filter('site-reviews/metabox/details', function ($metabox, $review) {
$ratingKeys = ['rating1', 'rating2', 'rating3']; // change these as needed
foreach ($review->custom as $key => $value) {
if (in_array($key, $ratingKeys) ) {
$value = glsr_star_rating($value); // render the stars from the rating value
}
// ...
}
return $metabox;
}, 10, 2);
And:
/**
* Renders the custom review fields
* Paste this in your active theme's functions.php file.
* In order to display the rendered custom fields, you will need to use a custom "review.php" template
* as shown in the plugin FAQ ("How do I change the order of the review fields?")
* and you will need to add your custom keys to it, for example: {{ name_of_your_custom_key }}
* @return array
*/
add_filter('site-reviews/review/build/after', function ($renderedFields, $review) {
$ratingKeys = ['rating1', 'rating2', 'rating3']; // change these as needed
foreach ($review->custom as $key => $value) {
if (in_array($key, $ratingKeys) ) {
$value = glsr_star_rating($value); // render the stars from the rating value
}
// ...
}
return $renderedFields;
}, 10, 2);
-
This reply was modified 2 years, 3 months ago by
Steve Stern (sterndata).
-
This reply was modified 2 years, 3 months ago by
Marius L. J.. Reason: Fixed missing parenthesis on posters behalf
That is definitely not what I had LOL
it’s throwing me an error. Puts the site down:
“There has been a critical error on your website.
Learn more about debugging in WordPress”
and here is what I get in the error log:
[26-Feb-2020 16:39:37 UTC] PHP Parse error: syntax error, unexpected ';' in /home/almostdone/pmd.almostdone.website/wp-content/themes/cesis_child_theme/functions.php on line 231
This is line 231:
$value = glsr_star_rating($value); // render the stars from the rating value
-
This reply was modified 2 years, 3 months ago by
gediweb.
-
This reply was modified 2 years, 3 months ago by
gediweb.
Ah, sorry.
This:
if (in_array($key, $ratingKeys) {
Should be this:
if (in_array($key, $ratingKeys)) {
Thanks 🙂 That took the error away but I still get the code on top and now no reviews in details see screenshot”
And I’m so sorry to be a pain. I just want to get this right.
https://snipboard.io/TCV9Yk.jpg
Please see the updated link: https://pastebin.com/4fvKErcp