Formhandler: Submit-Problem (reloaded das Formular neu)
| Autor | Nachricht |
|---|---|
|
Verfasst am: 25. 01. 2012 [18:10]
|
|
|
drjones
Dabei seit: 15.01.2010
Beiträge: 6
|
Ich habe, nachdem ich keine Zeit mehr an die unberechenbaren Bugs von Powermail verschwenden will, mir mal Formhandler angesehen (1.1.0) angesehen und ein wenig getestet. Ist scheinbar wirklich gut gelungen. Allerdings habe ich nachdem ich ein Radio mit Validierung in das Formular eingebaut habe das Problem, dass das Formluar nicht mehr abgeschickt wird. Nach dem Submit reloaded er einfach das Formular mit allen Werten und schreibt die Nachricht weder ins Log noch wird eine E-Mail versandt. Auch ein Entfernen der Radios aus dem Master-Template bringt nichts. Ich weiß dummerweise nicht mehr genau, was ich geändert habe seit es vor dem Radio lief Hat jemand eine Idee,w as ich verbockt haben könnte? Anbei das TS und Template: Das TS: TYPOSCRIPT plugin.Tx_Formhandler.settings.predef.validation-ajax-validation { debug = 1 # This is the title of the predefined form shown in the dropdown box in the plugin options. name = Formhandler Validation with AJAX based Error Checks # All form fields are prefixed with this values (e.g. ajax-validation[name]) formValuesPrefix = ajax-validation radioButtonFields = attention langFile.1 = TEXT langFile.1.value = {$formhandlerExamples.validation.ajax-validation.rootPath}/lang/lang.xml templateFile = TEXT #templateFile.value = {$formhandlerExamples.validation.ajax-validation.rootPath}/html/step-1.html templateFile.value = fileadmin/styles/00_bls_layout/HTML-templates/formhandler/2-ajax-validation.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.validation.ajax-validation.rootPath}/html/mastertemplate.html # If you use YAML, you don't need to include 1&2 cssFile { #10 = TEXT #10.value = {$formhandlerExamples.validation.ajax-validation.rootPath}/skin/css/base.css #20 = TEXT #20.value = {$formhandlerExamples.validation.ajax-validation.rootPath}/skin/css/forms.css 25 = TEXT 25.value = {$formhandlerExamples.validation.ajax-validation.rootPath}/skin/css/special.css 30 = TEXT 30.value = {$formhandlerExamples.validation.ajax-validation.rootPath}/skin/css/colors.css } # In case an error occurred, all markers ###is_error_[fieldname]### are filled with the configured value of the setting "default". isErrorMarker { default = <img src="typo3conf/ext/formhandler/Resources/Images/notok.png" /> } # These wraps define how an error message looks like. The message itself is set in the lang file. singleErrorTemplate { totalWrap = <div class="error">|</div> singleWrap = <span class="message">|</span> } # This is the class name and config of the AJAX handler responsible for inserting the right JavaScript code for the AJAX validation into the markers ###validate_[fieldname]### ajax { class = Tx_Formhandler_AjaxHandler_JQuery config { #ajaxSubmit = 1 notOk = <img src="typo3conf/ext/formhandler/Resources/Images/notok.png" /> ok = <img src="typo3conf/ext/formhandler/Resources/Images/ok.png" /> initial = ###is_error_###fieldname###### loading = <img src="typo3conf/ext/formhandler/Resources/Images/ajax-loader.gif" /> } } # This block defines the error checks performed when the user hits submit. validators { 1.class = Validator_Default 1.config.fieldConf { name.errorCheck.1 = required #attention.errorCheck.1 = required email.errorCheck.1 = required email.errorCheck.2 = email message.errorCheck.1 = required } } 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.validation.ajax-validation.rootPath}/html/email-admin.html sender_email = {$formhandlerExamples.validation.ajax-validation.email.admin.sender_email} to_email = {$formhandlerExamples.validation.ajax-validation.email.admin.to_email} subject = TEXT subject.data = LLL:{$formhandlerExamples.validation.ajax-validation.rootPath}/lang/lang.xml:email_admin_subject } } # Finisher_Redirect will redirect the user to another page after the form was submitted successfully. 5.class = Finisher_Redirect 5.config { redirectPage = {$formhandlerExamples.validation.ajax-validation.redirectPage} } } } Das HTML-Template: HTML <!-- ###TEMPLATE_FORM1### --> ###master_multipart-form-start_contact-form### ###master_section-start### ###master_attention_ajax### ###master_input_ajax_firstname### ###master_input_ajax_lastname### ###master_input_ajax_email### ###master_input_ajax_phoneoptional### ###master_textarea_ajax_message### ###master_section-end### ###master_section-start### ###master_submit### ###master_section-end### ###master_form-end### <!-- ###TEMPLATE_FORM1### --> Und das Master: HTML <!-- ###master_attention_ajax### --> ###error_attention### <div class="type-check ajax"> <label for="attention">###LLL:attention### ###required_attention###</label> <div> <input type="radio" id="attention-mr" name="###formValuesPrefix###[attention]" value="###LLL:attention.mr###" ###checked_attention_###LLL:attention.mr###### /> <label for="attention-mr">###LLL:attention.mr###</label> </div> <div> <input type="radio" id="attention-mrs" name="###formValuesPrefix###[attention]" value="###LLL:attention.mrs###" ###checked_attention_###LLL:attention.mrs###### /> <label for="attention-mrs">###LLL:attention.mrs###</label> </div> ###validate_attention### </div> <!-- ###master_attention_ajax### --> |



