04. 12. 2011, 12:36

Hallo.

Vorab. Bin kein Meister des Programmierens

Steh grad an, vielleicht kann mir wer von euch helfen. Hab früher mit der ext Mailformer gearbeitet, da hat alles funktioniert. Aber bei Formhandler hab ich das Problem, dass ich ein Formular angezeigt bekomme, ich kann es ausfüllen, bestätigen, aber dann ladet der browser einfach die seite neu und das formular bleib ausgefüllt. Geht nicht an die vordefinierte "Versandseite" weiter und schickt auch keine Mail weg. Auch in der Backend-Version von Formhandler sehe ich keinen Datensatz.

Hab jetzt einiges ausprobiert, aber komm auf keinen grünen punkt

Folgendes ist inhalt des Erweiterungstemplates zum eigentlichen Template.

Meine Konstanten:

  1. formhandlerExamples.basic.field-demo-contact-form {
  2.  
  3. # cat=Formhandler Examples - Basic - Field Demo Contact Form/basic/10; type=string; label=Root path: Path where the example was saved to.
  4. rootPath = fileadmin/forms/kontaktformular/
  5. email {
  6.  
  7. user {
  8.  
  9. # cat=Formhandler Examples - Basic - Field Demo Contact Form/basic/20; type=string; label=User email sender: Email address to use as sender address for the user email.
  10. sender_email = noreply@thatsmusical.or.at
  11.  
  12. }
  13.  
  14. admin {
  15.  
  16. # cat=Formhandler Examples - Basic - Field Demo Contact Form/basic/20; type=string; label=Admin email sender: Email address to use as sender address for the admin email.
  17. sender_email = kontaktformular@thatsmusical.or.at
  18.  
  19. # cat=Formhandler Examples - Basic - Field Demo Contact Form/basic/20; type=string; label=Admin email recipient: Email address of an admin to receive the contact request.
  20. to_email = verwaltung@thatsmusical.or.ar
  21. }
  22. }
  23.  
  24. # cat=Formhandler Examples - Basic - Field Demo Contact Form/basic/40; type=string; label=Redirect Page: Page ID to redirect after successful form submission.
  25. redirectPage = 13
  26. }

Mein Setup

  1. plugin.Tx_Formhandler.settings.predef.formhandler-basic-fielddemocontactform {
  2.  
  3. # This is the title of the predefined form shown in the dropdown box in the plugin options.
  4. name = Kontaktformular
  5.  
  6. # All form fields are prefixed with this values (e.g. contact[name])
  7. formValuesPrefix = kontaktformular
  8.  
  9. langFile.1 = TEXT
  10. langFile.1.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/lang/lang.xml
  11.  
  12. templateFile = TEXT
  13. templateFile.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/html/step-1.html
  14.  
  15. # 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.
  16. masterTemplateFile = TEXT
  17. masterTemplateFile.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/html/mastertemplate.html
  18.  
  19. # If you use YAML, you don't need to include 1&2
  20. cssFile {
  21. 10 = TEXT
  22. 10.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/skin/css/base.css
  23. 20 = TEXT
  24. 20.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/skin/css/forms.css
  25. 25 = TEXT
  26. 25.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/skin/css/special.css
  27. 30 = TEXT
  28. 30.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/skin/css/colors.css
  29. }
  30.  
  31. # These wraps define how an error messages looks like. The message itself is set in the lang file.
  32. singleErrorTemplate {
  33. totalWrap = <div class="error">|</div>
  34. singleWrap = <span class="message">|</span>
  35. }
  36.  
  37. # This block defines the error checks performed when the user hits submit.
  38. validators {
  39. 1.class = Validator_Default
  40. 1.config.fieldConf {
  41. name.errorCheck.1 = required
  42. email.errorCheck.1 = required
  43. email.errorCheck.2 = email
  44. message.errorCheck.1 = required
  45. }
  46. }
  47.  
  48. # Finishers are called after the form was submitted successfully (without errors).
  49. finishers {
  50.  
  51. # Finisher_Mail sends emails to an admin and/or the user.
  52. 1.class = Finisher_Mail
  53. 1.config {
  54. checkBinaryCrLf = message
  55. admin {
  56. templateFile = TEXT
  57. templateFile.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/html/email-admin.html
  58. sender_email = {$formhandlerExamples.basic.field-demo-contact-form.email.admin.sender_email}
  59. to_email = {$formhandlerExamples.basic.field-demo-contact-form.email.admin.to_email}
  60. subject = TEXT
  61. subject.data = LLL:{$formhandlerExamples.basic.field-demo-contact-form.rootPath}/lang/lang.xml:email_admin_subject
  62. }
  63. }
  64.  
  65. # Finisher_Redirect will redirect the user to another page after the form was submitted successfully.
  66. 5.class = Finisher_Redirect
  67. 5.config {
  68. redirectPage = {$formhandlerExamples.basic.field-demo-contact-form.redirectPage}
  69. }
  70. }
  71.  
  72. }
  73.  
  74. # If the user has chosen to receive a copy of the contact request, reconfigure Finisher_Mail to send an email to the user to.
  75. [globalVar = GP:contact|receive-copy = 1]
  76. plugin.Tx_Formhandler.settings.predef.formhandler-basic-fielddemocontactform {
  77. finishers {
  78. 1.config {
  79. user {
  80. templateFile = TEXT
  81. templateFile.value = {$formhandlerExamples.basic.field-demo-contact-form.rootPath}/html/email-user.html
  82. sender_email = {$formhandlerExamples.basic.field-demo-contact-form.email.user.sender_email}
  83. to_email = email
  84. subject = TEXT
  85. subject.data = LLL:{$formhandlerExamples.basic.field-demo-contact-form.rootPath}/lang/lang.xml:email_user_subject
  86. }
  87. }
  88. }
  89. }
  90. [global]