[TYPO3-dev] Using formhandler; How to replace database uid values from selectboxes with readable text for emails

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Fri Aug 20 17:55:36 CEST 2010


Hello folks!

I'm populating a selectbox with usergroups from the database.
Therefor I'm setting a custom marker using TS and add this
marker to the HTML form template.

The sourc then generated looks like this:

	<select name="formhandler[usergroup]">
		<option></option>
		<option value="1">Group 1</option>
		<option value="2">Group 2</option>
		...
	</select>

Note the "value" attribute. It holds the actual uid of the
usergroup for each option someone could choose.

The problem now is, that also this value gets displayed in
the emails, which are sent to the user, but not the readable title.

The text in the email looks like this:

	"You've chosen this usergroup: 1"

Furthermore if the selectbox allows the user to choose
multiple options, the text will look like this:

	"You've chosen this usergroup: 1,2"

Instead something like this should be sent:

	"You've chosen this usergroup: Group 1, Group 2"

Is there any built-in or any self-crafted solution available for this?
I'm not sure how this could be handled correctly.

Thanks a lot in advance!

Thomas




More information about the TYPO3-dev mailing list