Closed (fixed)
Project:
Conditional Fields
Version:
5.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2008 at 01:23 UTC
Updated:
11 Jul 2008 at 11:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
bsuttis commentedTitle typo =/
Comment #2
threexk commentedI started to look into this, and it appears the '*' was intentionally put in the wrong place because there was no simple way to put it in the right place. (Required conditional fields are not actually set to required when they are given to Drupal to render, yet Drupal normally inserts the asterisk depending on whether the field is set to required.)
Comment #3
peterpoe commented@threexk: Correct. The asterisk is put there by theme_form_element in forms.inc
I didn't want to override just to move the asterisk. Now that conditional fields are passed through a custom theme function (theme_conditional_fields_form_item), I guess that we could work there...
Comment #4
threexk commentedHere's a patch using theme_conditional_fields_form_item() per your suggestion, peterpoe. It sets #required for all fields with #required_field just prior to drupal_render(). That way, Drupal renders them like it would any other required field.
I don't think you'd ever want required conditional fields to look different than a normal required field, so I removed theme_conditional_field_required_title(). (This was mainly duplicated code from core anyway.)
Comment #5
peterpoe commentedTested and seems to work fine... Adding to cvs.
Comment #6
peterpoe commentedComment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.