It would be useful to have the fieldname as an available variable when the labels and descriptions are passed to the theme function.

Given the "better descriptions" are added as a prefix or suffix to the form elements it's not always clear which form element they relate to at a DOM level.

See attached patch which makes an additional "field" variable available to the template.

Comments

8ballsteve created an issue. See original summary.

8ballsteve’s picture

StatusFileSize
new1.28 KB
yogeshmpawar’s picture

Title: Pass fieldname to theme function for more themeing options? » Pass fieldname to theme function for more theming options?
yogeshmpawar’s picture

Status: Active » Needs work
+++ b/better-field-descriptions-text.tpl.php
@@ -1,4 +1,4 @@
+q<?php

Please remove "q" from this file & please upload updated patch.

8ballsteve’s picture

StatusFileSize
new1.22 KB

Updated patch attached:

yogeshmpawar’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.03 KB

Thanks @8ballsteve - here's the updated patch.

yogeshmpawar’s picture

Status: Reviewed & tested by the community » Fixed

Committed & pushed to 7.x-1.x branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.