[Typo3] Newsletter Categories

Sacha Vorbeck info at unlimited-vision.net
Wed Nov 23 16:50:24 CET 2005


Hi,

I created a newsletter registration with sr_email_subscribe. The
registration form allows to select multiple categories. The selection
will be stored into the database but if the user doesn`t fill in the
form correctly and the error messages are shown or if the user edits his
profile, the selection won`t be displayed. Instead, only the first box
is checked and the user will have to make his selection again.

Here are the relevant parts of my SETUP:

create = 1
create {
	defaultValues {
		module_sys_dmail_category = 1
	}
	overrideValues {
		module_sys_dmail_category >
	}
	evalValues {
		email = email,atMost[255],uniqueLocal
	}
}

edit < .create
edit {
	defaultValues {
		module_sys_dmail_html >
	}
	overrideValues {
		hidden = 0
	}
}

parseValues {
	module_sys_dmail_category =
checkArray[{$plugin.tx_sremailsubscribe.dmailCategories}],setEmptyIfAbsent
}



and the category block of the HTML template:

<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category###-->
<strong>Interessengebiete:</strong><br />
Ich möchte per E-Mail Informationen erhalten über:<br />
<!--###SUB_REQUIRED_FIELD_module_sys_dmail_category###-->
<span class="error">###MISSING_MODULE_SYS_DMAIL_CATEGORY###</span><br />
<!--###SUB_REQUIRED_FIELD_module_sys_dmail_category###-->
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_0###-->
<input type="checkbox" class="right"
name="FE[tt_address][module_sys_dmail_category][0]" />
<label>Kultur- &amp; Freizeitangebote</label><br />
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_0###-->
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_1###-->
<input type="checkbox" class="right"
name="FE[tt_address][module_sys_dmail_category][1]" />
<label>Stadtfeste und Großereignisse</label><br />
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_1###-->
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_2###-->
<input type="checkbox" class="right"
name="FE[tt_address][module_sys_dmail_category][2]" />
<label>Business Events</label><br />
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_2###-->
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_3###-->
<input type="checkbox" class="right"
name="FE[tt_address][module_sys_dmail_category][3]" />
<label>Wirtschaftsstandort Wuppertal</label><br />
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_3###-->
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_4###-->
<input type="checkbox" class="right"
name="FE[tt_address][module_sys_dmail_category][4]" />
<label>Touristische Angebote in und um Wuppertal</label><br />
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_4###-->
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_5###-->
<input type="checkbox" class="right"
name="FE[tt_address][module_sys_dmail_category][5]" />
<label>Souvenirs aus Wuppertal</label><br />
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category_5###-->
<!--###SUB_INCLUDED_FIELD_module_sys_dmail_category###-->


Any ideas on what how to solve this?

-- 
thank you - all the best,
Sacha



More information about the TYPO3-english mailing list