Asterisks not appearing for required field Fivestar

Created on 15 April 2022, about 2 years ago
Updated 8 June 2024, 16 days ago

Problem/Motivation

Label for field fivestar haven't classes "js-form-required form-required" -> asteriks disappers. It set up as required field. Other required fields have this classes and asteriks appears.

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇧🇾Belarus VasiliyRepin Minsk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India DeepaliJ

    Able to reproduce the issue.
    Applied the patch #15 on Drupal 9.5.2 with the module Fivestar 8.x-1.x-dev
    The patch applied cleanly.
    But the issue still exists. Patch did not fix the asterisks issue when the rating field is marked required
    Refer to the attached screenshots

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States TR Cascadia

    I think a number of things introduced in #13 are out of scope and taking this the wrong direction. There should not be any explicit styling added in this patch - the styling of the messages area is the responsibility of the theme, not of any module, and this module shouldn't be setting background colors or anything like that. Also, none of this work should be done in JavaScript. Required form element validation is a core Drupal functionality that should be handled by core.

    I think the proper fix is something like #9, but it needs to be updated for the comment in #11.

  • 🇺🇸United States bajah1701

    Patch #9 works however i noticed that the error message is displayed twice. No sure why that is the case, couldn't identify anything in the patch that would allow for that to happen. Also, drupal fields uses JS to display the error message on a required field in context, such that the form is not submit to the server, this functionality doesn't seem to be present with fivestar fields.

Production build 0.69.0 2024