Hi Profs,
habe ein Problem mit Select-Feldern - und zwar nur wenn diese Pflichtfelder sind und validiert werden. Der User wählt ganz richtig einen Eintrag vom Select-Feld aus - jedoch ein anderes Pflichtfeld (zB. ein Text-Feld) wird nicht ausgefüllt.
Nach einem Klick auf "Senden" werden korrekter Weise die richtigen Fehlermeldungen angezeigt - JEDOCH bleiben die ausgewählten Werte meiner Select-Felder NICHT erhalten - alle anderen schon.
Das ist lästig, weil der User nun vielleicht gar nicht bemerkt, dass in den Select-Feldern wieder "bitte wählen Sie aus" steht und nicht seine vorher getroffene Auswahl und es somit wieder zu Fehlermeldungen kommt.
Meine Versionen:
Typo3: 4.1
TMailform: pil_mailform 3.0.3
Ich bin für Hilfe sehr dankbar, da ich an dem Problem nun schon 2 Tage herumdoktore.
Gruß, Alex
hier mein Formular:
<!-- ###TMAIL_FORM### begin -->
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {color: #003366}
-->
</style>
<form action="###FORM_URL###" method="post" enctype="multipart/form-data">
<p> </p>
<p>
<input type="hidden" name="MAX_FILE_SIZE" value="300000000" />
</p>
<table width="100%" cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" bgcolor="#CCCCCC"><h1><strong>Kontaktformular </strong></h1>
<p>mit "*" gekennzeichnete Felder müssen unbedingt ausgefüllt werden!</p>
<hr /></td>
</tr>
<tr>
<td width="120" valign="top">Thema: * </td>
<td valign="top"><p><strong>Bitte wählen Sie aus folgenden Themen, um Ihr Schreiben bestmöglich zuordnen zu können:</strong></p>
<p> </p>
<table width="600" border="0" cellpadding="5">
<tr>
<td width="165" bgcolor="#EBEBEB"><strong>MBA</strong></td>
<td width="275" bgcolor="#EBEBEB">Infos zu Inhalten, Aufnahmeverfahren und Voraussetzungen</td>
</tr>
<tr>
<td><strong>Events</strong></td>
<td>Anmeldungen zu Veranstaltungen (Kamingespräche, Vernissagen)</td>
</tr>
<tr>
<td bgcolor="#EBEBEB"><strong>Business School </strong></td>
<td bgcolor="#EBEBEB">Allgemeine Infos und Unterlagen</td>
</tr>
<tr>
<td><strong>Administration</strong></td>
<td> Anmeldungen zu Seminaren und Lehrgängen</td>
</tr>
</table>
<p> </p>
<p>
<select name="tx_pilmailform_pi1[select][thema]">
<option value="" selected="selected">bitte wählen</option>
<option value="MBA" ###THEMA_MBA_VAL###>MBA</option>
<option value="Event" ###THEMA_EVENT_VAL###>Event</option>
<option value="Business School" ###THEMA_BSV_VAL###>Business School</option>
<option value="Administration" ###THEMA_ADMINISTRATION_VAL###>Administration</option>
</select>
<span class="style1">###THEMA_ERR_TXT###</span></p>
<p> </p>
<p> </p></td>
</tr>
<tr>
<td>Anrede *</td>
<td><select name="tx_pilmailform_pi1[select][salutation]">
<option value="" selected="selected">bitte wählen</option>
<option value="Frau" ###SALUTATION_MRS_VAL###>Frau</option>
<option value="Herr" ###SALUTATION_MR_VAL###>Herr</option>
</select>
<span class="style1">###SALUTATION_ERR_TXT###</span></td>
</tr>
<tr>
<td>Titel</td>
<td><input name="tx_pilmailform_pi1[text][title]" type="text" value="###TITLE_VAL###" size="40" /></td>
</tr>
<tr>
<td>Vorname *</td>
<td><input name="tx_pilmailform_pi1[text][first_name]" type="text" value="###FIRST_NAME_VAL###" size="40" />
<span class="style1">###FIRST_NAME_ERR_TXT###</span></td>
</tr>
<tr>
<td>Nachname *</td>
<td><input name="tx_pilmailform_pi1[text][last_name]" type="text" value="###LAST_NAME_VAL###" size="40" />
<span class="style1">###LAST_NAME_ERR_TXT###</span></td>
</tr>
<tr>
<td>Firma</td>
<td><input name="tx_pilmailform_pi1[text][company_e]" type="text" value="###COMPANY_E_VAL###" size="40" /></td>
</tr>
<tr>
<td>Strasse</td>
<td><input name="tx_pilmailform_pi1[text][street]" type="text" value="###STREET_VAL###" size="40" /></td>
</tr>
<tr>
<td>PLZ</td>
<td><input name="tx_pilmailform_pi1[text][postal_code]" type="text" value="###POSTAL_CODE_VAL###" size="40" /></td>
</tr>
<tr>
<td>Ort</td>
<td><input name="tx_pilmailform_pi1[text][city]" type="text" value="###CITY_VAL###" size="40" /></td>
</tr>
<tr>
<td>Land</td>
<td><input name="tx_pilmailform_pi1[text][country]" type="text" value="###COUNTRY_VAL###" size="40" /></td>
</tr>
<tr>
<td>Telefon</td>
<td><input name="tx_pilmailform_pi1[text][phoneprivate]" type="text" value="###PHONEPRIVATE_VAL###" size="40" /></td>
</tr>
<!-- ###HEADER_EMAIL_INVALID### begin -->
<tr>
<td colspan="2" style="color: red"><b>Wir konnten Ihre Email-Adresse nicht verifizieren. Vielleicht haben sie sich verschrieben?</b></td>
</tr>
<!-- ###HEADER_EMAIL_INVALID### end -->
<tr>
<td>Email *</td>
<td><input name="tx_pilmailform_pi1[text][email]" type="text" value="###EMAIL_VAL###" size="40" />
<span class="style1">###EMAIL_ERR_TXT###</span></td>
</tr>
<tr>
<td colspan="2"><input name="tx_pilmailform_pi1[checkbox][newsletter]" type="checkbox" value="yes" checked="checked" ###NEWSLETTER_YES_VAL### />
Ja, ich möchte die Business School News abonnieren.</td>
</tr>
<tr>
<td height="40"> </td>
<td> </td>
</tr>
<tr>
<td>Betreff * </td>
<td><input name="tx_pilmailform_pi1[text][betreff]" type="text" value="###BETREFF_VAL###" size="40" /></td>
</tr>
<tr>
<td valign="top">Nachricht * </td>
<td><textarea name="tx_pilmailform_pi1[text][nachricht]" cols="60" rows="10">###NACHRICHT_VAL###</textarea></td>
</tr>
<tr>
<td><input type="submit" name="tx_pilmailform_pi1[submit]" value="Senden" /></td>
<td> </td>
</tr>
</table>
</form>
<p>
<!-- ###TMAIL_FORM### end -->
<!-- ###TMAIL_MAIL_HTML### begin -->
<strong>Kontaktformular zum Thema: </strong> ###THEMA_VAL###</p>
<p> </p>
<table width="660" cellpadding="4" cellspacing="1" style="background: #333333;">
<tr>
<td colspan="3" style="background: #CCCCCC; color: #003366; font-weight: bold;">Persönliche Daten </td>
</tr>
<tr>
<td width="100" valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"><span class="style2">Name</span></td>
<td width="256" colspan="2" style="background: #ffffff;">###SALUTATION_VAL### ###TITLE_VAL### ###FIRST_NAME_VAL### ###LAST_NAME_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"><span class="style2">Firma</span></td>
<td colspan="2" style="background: #ffffff;">###COMPANY_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"><span class="style2">Strasse</span></td>
<td colspan="2" style="background: #ffffff;">###STREET_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"><span class="style2">Ort</span></td>
<td colspan="2" style="background: #ffffff;">###POSTAL_CODE_VAL### ###CITY_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"><span class="style2">Land</span></td>
<td colspan="2" style="background: #ffffff;">###COUNTRY_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"><span class="style2">Telefon</span></td>
<td colspan="2" style="background: #ffffff;">###PHONEPRIVATE_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"><span class="style2">Email</span></td>
<td colspan="2" style="background: #ffffff;">###EMAIL_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"> </td>
<td colspan="2" style="background: #ffffff;"> </td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;">Newsletter</td>
<td colspan="2" style="background: #ffffff;">###NEWSLETTER_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"> </td>
<td colspan="2" style="background: #ffffff;"> </td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;">Betreff</td>
<td colspan="2" style="background: #ffffff;">###BETREFF_VAL###</td>
</tr>
<tr>
<td valign="top" style="background: #ffffff; color: #003366; font-weight: bold;"><p>Nachricht</p> </td>
<td colspan="2" style="background: #ffffff;">###NACHRICHT_VAL###</td>
</tr>
</table>
<p> </p>
<p> </p>
<!-- ###TMAIL_MAIL_HTML### end -->
<!-- ###TMAIL_THANKS### begin -->
<h3>Vielen Dank </h3>
Wir werden uns schnellstens mit Ihnen in Verbindung setzen.
<!-- ###TMAIL_THANKS### end -->
<!-- ###TMAIL_ERROR### begin -->
<h3>Sorry</h3>
Ein interner Fehler ist aufgetreten. Ihre Eingabe konnte nicht ordnungsgemäß verarbeitet werden.
<!-- ###TMAIL_ERROR### end -->
und hier meine "Required Values":
THEMA_VAL; notEmpty; text: (Please fill in this field)
SALUTATION_VAL; notEmpty; text: (Please fill in this field)
FIRST_NAME_VAL; notEmpty; text: (Please fill in this field)
LAST_NAME_VAL; notEmpty; text: (Please fill in this field)
EMAIL_VAL; notEmpty; text: (Please fill in this field)
BETREFF_VAL; notEmpty; text: (Please fill in this field)
NACHRICHT_VAL; notEmpty; text: (Please fill in this field)