Closed (works as designed)
Project:
Ubercart Terms of Service
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2010 at 03:09 UTC
Updated:
20 Jan 2012 at 07:27 UTC
Required checkbox should have drupal's form required themed asterisk. Sorry, I could not figure out how to make this work in this module.
Comments
Comment #1
pcambraHi
What's the issue here? When the tos are required, there is no * in the checkbox? Please confirm
Comment #2
echoz commentedCorrect, I have the tos required in a checkout pane. Validation works by giving the error msg if you try to submit with the checkbox unchecked, but the checkbox does not have a red asterisk next to it.
My other required fields do have a red asterisk.
Comment #3
pcambraI think that this is intented for doing a custom validation message, I'll take a look to the code and I'll answer you more properly
Comment #4
3dloco commentedLooks like a Drupal core issue, see #222380: No error highlighting on form checkbox or radio input types and #847210: Mandatory checkbox items do not turn red on validation for workaround
Comment #5
pcambraThis is intended, the "i agree with the terms of service" checkbox is not required anymore, it does a custom validation function in order to show an informative message instead of "field is required", please see http://drupal.org/node/790584
You can always use a theme form function for getting the asterisk, or a form alter to made it required.
I'm closing this by design, please feel free to reopen it if you have a better solution!
Thanks
Comment #6
pcambraalso check this project http://drupal.org/project/checkbox_validate
Comment #7
agileadamIf you've made the field required through the option in the pane configuration, you can simple add the red asterisk with a hook_form_alter() like:
Please let me know if there's a better way to do this. It seems like a band-aid to me.
Comment #8
echoz commentedThanks @keystr0k