30. 04. 2014, 11:47

Hallo zusammen

In einer Typo3 Installation V6.1.8 mit Formhandler V1.7.0 habe ich ein Problem mit der email Validierung.
Im Formular habe ich ein Dropdown um den Mail-Empfänger auszuwählen mit anschließender Überprüfung
ob der Empfänger auch wirklich ausgewählt wurde.

Wenn ich nun im Formular den Empfänger auswähle sowie die sonstigen Felder befülle und das Formular
dann Abschicke, erhalte ich die Fehlermeldung es wäre kein Empfänger ausgewählt.
Deaktiviere ich den Validator für den "recipient" wird das Formular wie gewünscht dem selektierten
Empfänger zugeschickt.

Habt Ihr ev. einen Tipp woran das liegen kann?
Danke und Gruss
Peter

[b][u]Hier mal mein TS:[/u][/b]

plugin.Tx_Formhandler.settings.predef.formhandler-file-upload-ajax-file-removal {

# This is the title of the predefined form shown in the dropdown box in the plugin options.
name = Formhandler Ajax File Removal Form

# The formID setting is mandatory in combination with "enableFileRemoval=1". The formID is used to submit the right form on the page when clicking on the remove link.
formID = ajax-file-removal-form

# All form fields are prefixed with this values (e.g. ajax-file-removal[name])
formValuesPrefix = ajax-file-removal

langFile.1 = TEXT
langFile.1.value = {$formhandlerExamples.file-upload.ajax-file-removal.rootPath}/lang/lang.xml

templateFile = TEXT
templateFile.value = {$formhandlerExamples.file-upload.ajax-file-removal.rootPath}/html/step-1.html

# The master template is a file containing the markup for specific field types or other sub templates (e.g. for emails). You can use these predefined markups in your HTML template for a specific form.
masterTemplateFile = TEXT
masterTemplateFile.value = {$formhandlerExamples.file-upload.ajax-file-removal.rootPath}/html/mastertemplate.html

# CSS files
cssFile {
10 = TEXT
10.value = {$formhandlerExamples.file-upload.ajax-file-removal.rootPath}/skin/css/foundation.min.css
10.if.isTrue = {$formhandlerExamples.file-upload.ajax-file-removal.includeFoundationCSS}
20 = TEXT
20.value = {$formhandlerExamples.file-upload.ajax-file-removal.rootPath}/skin/css/special.css
}

# Define recipient dropdown
markers.options_recipient = CONTENT
markers.options_recipient {
table = fe_users
select {
#pid where feusers are stored
pidInList = 14
orderBy = name
selectFields = email, name
#contact form user group
where = FIND_IN_SET(3,fe_users.usergroup)
max = 10
}
renderObj = COA
renderObj {
#value
10.wrap = <option value="|"
10 = TEXT
10.field = email

#selected
12.noTrimWrap = | ###selected_recipient_|###>|
12 = TEXT
12.field = email

#label
13 = TEXT
13.value = {field:name} ({field:email})</option>
13.insertData = 1
}
}

# In case an error occurred, all markers ###is_error_[fieldname]### are filled with the configured value of the setting "default".
isErrorMarker {
default = error
}

# These wraps define how an error message looks like. The message itself is set in the lang file.
singleErrorTemplate {
totalWrap = <small class="error">|</small>
}

# These wraps define how the list of uploaded files for a single upload field looks like.
singleFileMarkerTemplate {
totalWrap = <div class="row"><div class="three columns"></div><div class="nine columns"><br /><span class="uploadedfiles-label">###LLL:uploadedFiles###</span><ul class="fileupload-list">|</ul></div></div>
singleWrap = <li>|</li>
showThumbnails = 0
}

# The AJAX class takes care of inserting the needed JavaScript code for the file removal.
ajax {
class = Tx_Formhandler_AjaxHandler_JQuery
}

files {

# Path to upload the files to (must exist!)
uploadFolder = uploads/formhandler/

# Allows the user to remove a previously uploaded file
enableAjaxFileRemoval = 1

# The default value of the link to remove a file would be "X".
customRemovalText = TEXT
customRemovalText {
value = {$formhandlerExamples.file-upload.ajax-file-removal.rootPath}/skin/images/delete.png
wrap = <img src="|" />
}
}

# This block defines the error checks performed when the user hits submit.
validators {
1.class = Validator_Default
1.disabled = 0
1.config.fieldConf {
recipient.errorCheck.1 = required
recipient.errorCheck.2 = email

name.errorCheck.1 = required
email.errorCheck.1 = required
email.errorCheck.2 = email
message.errorCheck.1 = required
message.errorCheck.2 = minLength
message.errorCheck.2.value = 5

file.errorCheck {
# Allow only the configured file extensions
1 = fileAllowedTypes
1.allowedTypes = pdf,doc,docx,jpg,png

# Max size of a file 5MB
2 = fileMaxSize
2.maxSize = 5242880

# Max 3 files are allowed to be uploaded though this upload field
3 = fileMaxCount
3.maxCount = 3
}
}
}

finishers {

# Finisher_Mail sends emails to an admin and/or the user.
1.class = Finisher_Mail
1.config {
checkBinaryCrLf = message
admin {
templateFile = TEXT
templateFile.value = {$formhandlerExamples.file-upload.ajax-file-removal.rootPath}/html/email-admin.html
sender_email = {$formhandlerExamples.file-upload.ajax-file-removal.email.admin.sender_email}
# to_email = {$formhandlerExamples.file-upload.ajax-file-removal.email.admin.to_email}
to_email = TEXT
to_email.data = GP:formhandler|recipient
subject = TEXT
subject.data = LLL:{$formhandlerExamples.file-upload.ajax-file-removal.rootPath}/lang/lang.xml:email_admin_subject

# Attach the uploaded files to the email sent out
attachment = file
}
}

# Finisher_Redirect will redirect the user to another page after the form was submitted successfully.
5.class = Finisher_Redirect
5.config {
redirectPage = {$formhandlerExamples.file-upload.ajax-file-removal.redirectPage}
}
}
}

[b][u]und mein HTML-Template:[/u][/b]

<!-- ###TEMPLATE_FORM1### -->
###master_multipart-form-start_ajax-file-removal-form###

###master_section-start###
<div class="row">
<div class="large-3 columns">
<label for="recipient">Empfänger</label>
</div>
<div class="large-9 columns">
<select name="formhandler[recipient]" id="recipient" size="1">
<option value="">- kein Empfänger gewählt -</option>
###options_recipient###
</select>
###error_recipient###
</div>
</div>
###master_section-end###
###master_section-start###
###master_input_name###
###master_input_email###
###master_textarea_message###
###master_section-end###
###master_section-start###
###master_file_file###
###master_section-end###
###master_section-start###
###master_submit###
###master_section-end###
###master_form-end###
<!-- ###TEMPLATE_FORM1### -->