kevinruscoe / acf-star-rating-field Goto Github PK
View Code? Open in Web Editor NEWA simple star rating field for ACF.
License: MIT License
A simple star rating field for ACF.
License: MIT License
@kevinruscoe Please consider loading inline svg instead of fa icons in wp admin. I do not use fontawesome for this frontend or at all. So I prefer to not load it in wp admin either. Could we disable it somehow?
Looks like the JS is only being loaded in the admin, even though you can use ACF to add a custom field to a comment form. Maybe you can add support for this?
Would be nice to add a composer.json for package installation.
I have this plugin installed alongside Advanced Custom Fields Pro.
When this plugin is not active, all the layouts in my Flexible Content field are editable and you can see their names:
When this plugin is active, all the layouts in my Flexible Content field become uneditable and their names are all just “Layout.”
When I click the down arrow at the right end of any of them, nothing happens and if I click “Add Layout” on any of them, the page refreshes and a message appears in a green box that says, “Field group updated.”
This happens to any Flexible Content field that I create, even in a different Field Group. This essentially makes this plugin unusable for me.
Hey, since Font Awesome 5 is not supporting fa fa-star-o
class for star outline icon and your plugin is importing FA5 dynamically from CDN, any solution?
Thank You :-)
It would be great if you could add a composer.json
file so I can require with Composer.
Using Roots Bedrock I am currently working around this, but I'd love to see this included when you get the time!
Many thanks for the plugin - I'm using it on a second project now. 👍
how to star show in wordpress theme?
Provides hover for stars - illuminating previous stars.
I realize you are currently using vanilla css, but I am providing it as scss,
https://gist.github.com/WillHall/d282499d137dea9bd8dc
Thanks for the very useful plugin!
The plugin works fine on back end forms, but doesn't work on front end. I inserted the field group with acf_form(), but click on stars and on clear button doesn't have any effect nor show an error in Javascript Console. Any hints?
Hello...
In the last ACF version, it don't work for me.
check pleease!
Star Rating field is not available in REST API.
I cannot set the value via REST API.
I added a theme option for my personal use and changed the CSS and smooshed it up a bit.
There's an issue when adding stars in the Media Library. When you add or change stars in the 'Attachment Details' popup (it pops up in grid mode), the value is not saved when you click 'next' or 'previous' image.
You can take a look in this screencast: http://recordit.co/8Ah8m5q9d8
When setting the return type to anything other than numeric, there is a non-numeric value encountered
warning in the output.
Any chance? far- and fas- instead of fa-
An option to not enqueue FA's css for those who have it already loaded would be great too.
Thanks.
How do I show the countries flag? In my only appears the name of the country without the flag. What would be the correct php to pull this information? And I really enjoyed your plugin !!!
I like the plugin, it's useful for me, but when I have this plugin enabled I can't use the 'Add rule group' or 'Conditional logic' functionality of ACF; I have to disable the plugin, add rule groups / conditional logic, then enable it again. Doesn't make a difference if the Field Group is using Star Rating or not.
Is this plugin only available to use on the admin side?
is it possible to have subscribers to select the rating?
Thank you
Hey,
I have this error in the admin woocommerce products list:
This specific ACF field type is not supported in this integration. Although the column may work, it could lead to unexpected behavior. Sorting, Filtering and Inline Editing are disabled for this field.
BTW: love this plugin, thanks 🙏
error in console:
jquery.min.js:2 jQuery.Deferred exception: Cannot read properties of undefined (reading '0') TypeError: Cannot read properties of undefined (reading '0') at initialiseField (http://local.test/wp-content/plugins/acf-star-rating-field/js/input.js:10:38) at HTMLDivElement.<anonymous> (http://local.test/wp-content/plugins/acf-star-rating-field/js/input.js:75:4) at Function.each (http://local.test/wp-includes/js/jquery/jquery.min.js:2:3003) at s.fn.init.each (http://local.test/wp-includes/js/jquery/jquery.min.js:2:1481) at http://local.test/wp-content/plugins/acf-star-rating-field/js/input.js:74:11 at http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf-input.min.js:1:2262 at o (http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js:1:1417) at Object.doAction (http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js:1:587) at n.doAction (http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js:1:18166) at HTMLDocument.<anonymous> (http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js:1:27130) undefined
After activating it, I got this error:
Parse error: syntax error, unexpected 'Clear' (T_STRING) in /home/fluxdemo/public_html/demo/demo32/wp-content/plugins/acf-star-rating-master/acf-star_rating-v5.php on line 132
I've added star rating field type, set it as "Required = yes", but when I submit the form without choosing a rating, it does not show up in the list of "Validation Failed"
Is that because there is an option for "0" stars? I'd like to require the user to set it 1-5 stars before validating. Any idea on how to do this?
Hi!
Question:
I installed this plugin and got it to show in the backend of my custom post type.
How would I get the rating to show on my single template so users can rate the article?
Or is this not built for frontend use?
Question 2: How would I get a top 5 article list based on rating?
Regards,
Thomas
My star rating is not working with ajax. I am using this on comment form.
I am using WP Ajaxify Comment plugin.
Please help.
Hi!
WP All Import did not supported the Star Rating field...untill now.
I've been in touch with their developers and they have just released an update including support for this field type. Possibly worth mentioning in the Docs?
Recently implemented this in a project, great stuff!
I'm using it in a WP comment form, together with other ACF custom fields. These fields are all required and when trying to send the form with empty fields, standard ACF fields get a small popup with "Fill out this field". The stars are also required, but when sending the form, it goes to a new page with the error message "Please enter a value clicking on stars form 1 to 5".
By this point the form has already submitted the comment though. When going back to the form page in the browser and selecting stars, then trying to post the comment again, it says a similar comment has already been posted. Which means the saved comment doesn't have most form data.
Would it be possible to do the required field check on the form page, like ACF, instead of a separate page?
Ps. There also seems to be a typing error in the "..clicking on stars form.." above (form instead of from). This is from line #287 in StarRatingField.php
Hi,
you’ve build an excellent star-rating plugin for acf.
On my Website I work with Brizy.
So far I didn’t find a way how your plugin is compatible with Brizy.
Du you know a way that your plugin works with Brizy?
This plugin breaks in ACF Version 5.1.7. View the thread here.
input.min.js?ver=5.1.7:587 s.replace:
2015-01-22 22:56:56.556input.min.js?ver=5.1.7:588 function replace() { [native code] }
2015-01-22 22:56:56.556input.min.js?ver=5.1.7:585 s:
2015-01-22 22:56:56.556input.min.js?ver=5.1.7:586 flexible_content
2015-01-22 22:56:56.556input.min.js?ver=5.1.7:587 s.replace:
2015-01-22 22:56:56.557input.min.js?ver=5.1.7:588 function replace() { [native code] }
2015-01-22 22:56:56.557input.min.js?ver=5.1.7:585 s:
2015-01-22 22:56:56.557input.min.js?ver=5.1.7:586 gallery
2015-01-22 22:56:56.557input.min.js?ver=5.1.7:587 s.replace:
2015-01-22 22:56:56.557input.min.js?ver=5.1.7:588 function replace() { [native code] }
input.min.js?ver=5.1.7:585 s:
2015-01-22 22:56:57.004input.min.js?ver=5.1.7:586 Object {type: "star_rating"}
2015-01-22 22:56:57.006input.min.js?ver=5.1.7:587 s.replace:
2015-01-22 22:56:57.006input.min.js?ver=5.1.7:588 undefined
2015-01-22 22:56:57.007input.min.js?ver=5.1.7:592 Uncaught TypeError: undefined is not a function
Hello, tell me please. How to form a star rating in a post using a shortcode? I'm trying to insert a shortcode from ACF, but only a numeric value is displayed, instead of stars.
How is this supposed to show on the front end?
With the label and five stars below it?
I've gotten it to work in ACF, to show in a CPT, but am not clear on how it will present on the front-end?
Hello. Is it possible to make the rating required and display an error if a rating is not selected? It is currently set as required in the ACF admin, but that does not seem to be working.
An option within ACF to either enable or disable half stars.
In my case I didn't need to use half stars so i just deleted a few lines from input.js
.
Posted for future reference.
If the official Font Awesome plugin is installed and set to use a kit, and that kit is set to use SVGs, the javascript for this plugin can't update the field in wp-admin to reflect the selected star rating. This is because when a kit uses SVGs, it comments out the <i>
tags, causing the JS to fail to iterate over the collection. The value will still be set and saved properly, there's just no visual indication that anything changed. If the kit is set to use Webfonts, everything behaves as expected.
Would be nice to add support for ACF's conditional logic.
@kevinruscoe: Please tag a new release so composer can use the correct package type.
Hi,
I am using your plugin and it is great. It's working great in the post admin section and gives "Stars Value" But when I output the value it gives "Numeric Value" in the front-end of the post page.
How can I solve this ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.