Hello all! I went on and tried to customize the review form semi-successfully.
I was able to add fields to the form, still need to tweak CSS so that at least the labels show before the fields instead of on top, the issue I am having is that the custom fields are not saved into the database.
In addition, the review now is not shown on the listing page.
I have followed the video on customizing forms (it uses the message form as an example) and the documentation as much as I was able to figure it out.
Here is my code, added to the functions.php file.
The result is the same, the comment is saved in the database, the other fields are not.
Upon approval of the comment, it will not show in the front under the user listing.
Code:
I realized the _order values did not match on both filters and used the same order. Now the testimonial shows, but again, without all the custom fields, just the rating and comments are shown
I commented out my own function, and just to make sure, I copied your functions and used them as you posted them. The results are the same, the extra fields are not saved to the table and they are not shown in the review block.
I realize this should be simpler, as the video I watched seems to work just fine by modifying the comments, but for some reason, I still think there is something missing.
Sorry for the misunderstanding. Please try this PHP snippet instead. In this way, adding other fields to the form and saving their value after submitting the form is possible. This code snippet only adds fields to the review submit form and saves their values in the database.
It requires advanced customization if you want to show their values in the single review block on the listing page. Please use this PHP code snippet as an example. It shows the field clicks_ordered in the review block
This works perfectly, the _external parameter was missing.
With this problem fixed, I wonder if there is a way to modify the submit review form in a way that the fields are displayed in 2 columns? The modal form is too long with the additional fields.
Thank you for your help, much appreciated!
It is possible, but unfortunately, there’s no simple code snippet. It would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work https://fvrr.co/32e7LvY
I apologize if it would be better to open a new topic, but since they are related, I thought I would just ask here. Is there a way to show “No reviews yet, Submit a review” (submit a review being a link to open the review form) in the review list when no reviews have been posted yet?
Sorry, there’s no simple code snippet for this, it would require a custom implementation. If customizations beyond the available features are required for your site, please consider hiring someone for custom work https://fvrr.co/32e7LvY