Closed (fixed)
Project:
Webform
Version:
5.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2007 at 09:18 UTC
Updated:
13 Mar 2011 at 23:31 UTC
hi all, i'm trying to get rid of the colon (:) at the end of a question. I want to put a question survey with a question mark (?) at the end. It won't look funny if the label looks like this
How satisfy are you with our products?:
Somebody guide me how to remove the symbol, colon (:) please?
Thanks.
Comments
Comment #1
suit4 commentedthis can be done globally only, that means for all form elements!
override theme_form_element, e.g.put this in your template.php
the colon comes from these lines:
you need to remove the colon after !title!
hope that helps
Comment #2
seakayjay commentedthank you so much. the code works.
Comment #3
mandclu commentedI was able to selectively remove the colons after question marks by changing the function as follows:
Comment #4
suit4 commentedhmm, nice idea,
but in general users should be able to set questionmarks, colons or whatever as they need them. this shouldn't be hardcoded. maybe the drupal core needs a wrapper class for its own form labels.
Comment #5
mandclu commentedI guess the only thing I can say is that for the sake of consistency there is something to be said for having the end character added automatically.
Another approach would be to allow admin settings for the final character, and the also allow characters to be specified following which the character should not appear. Wouldn't be a crazy amount of work, though perhaps overkill for most users. The nice thing, though, would be that could maintain the current behaviour but allow for savvy users to make their installations more complicated, to meet their needs.
I know in French they tend to prefer a space before the colon, so maybe better terminology would be label suffix, and it should accept more than a single character.
Comment #6
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
citronica commented@surge_martin:
Thanks! This still works in Drupal 6.10.
Comment #8
decibel.places commentedthis did not work for me on webform labels
I devised a DHTML method http://drupal.org/node/293908/1540580
Comment #9
suit4 commentedTo remove other types of punctuation from the end of field labels, the theme function can easily be altered like this:
This works in D6 as well.
Comment #10
christefano commentedI've noticed that the approach in #9 doesn't work if the form element is a select widget.
Comment #11
alex.pilon commentedNice to have a default though..