Nach langem hin und her habe ich nun den Fehler gefunden.
Jetzt habe ich aber ein Problem mit dem defaultValue. Wie werden im zweiten Schritt defaultValues gesetzt?

Die richtige Conf ist bisher:

plugin.Tx_Formhandler.settings.predef.online_reservation < plugin.Tx_Formhandler.settings.predef.default
plugin.Tx_Formhandler.settings.predef.online_reservation {
  name = Online-Reservierung
templateFile = fileadmin/templates/plugin.tx_formhandler.online_reservation.html

  preProcessors.1 {
    class = Tx_Formhandler_PreProcessor_LoadDefaultValues
    config.1.name.defaultValue = Meine Name
# eine variante
    config.2.field.defaultValue = Mein Feld
  }

  1.validators.1.class = Tx_Formhandler_Validator_Default
  1.validators.1.config.fieldConf {
    name.errorCheck.1 = required
    email.errorCheck.1 = required
    email.errorCheck.2 = email
  }

  if {
    1.conditions.OR1.AND1 = reservationType=Reservierung 1
    1.isTrue.2 {
      templateSuffix = _r1
      validators.1.class = Tx_Formhandler_Validator_Default
      validators.1.config.fieldConf {
        field.errorCheck.1 = required
      }
    }

    2.conditions.OR1.AND1 = reservationType=Reservierung 2
    2.isTrue.2 {
      templateSuffix = _r2
# eine weitere variante
  preProcessors.1 {
    class = Tx_Formhandler_PreProcessor_LoadDefaultValues
    config.2.reservationChildCount.defaultValue = Mein Feld
  }
      validators.1.class = Tx_Formhandler_Validator_Default
      validators.1.config.fieldConf {
        field.errorCheck.1 = required
      }
    }

    3.conditions.OR1.AND1 = reservationType=Reservierung 3
    3.isTrue.2 {
      templateSuffix = _r3
      validators.1.class = Tx_Formhandler_Validator_Default
      validators.1.config.fieldConf {
        field.errorCheck.1 = required
      }
    }
  }
}

Am 22.06.10 11:03, schrieb ad:
Hallo Leute!

Könnt ihr mir mal mit einem formhandler multistep-Formular helfen?
Ziel des Formular ist eine Reservierung mit Optionen. Auf der ersten
Seite gibt's eine Auswahl, die dann zu drei unterschiedlichen zweiten
Stufe führt.

Im Template exestiert bereits der Wert "submitted=1" und beim
Sende-Button gibts auch den Marker "###submit_nextStep###". Das sind ja
die häufigsten Fehlerquellen ;)
Und es gibt dann den Bereich für das Haupt-Form TEMPLATE_FORM1 und dann
noch drei weitere TEMPLATE_FORM2_xxx für den zweiten Schritt.

Das Problem ist nun, dass der zweite Schritt nicht validiert wird. Beim
Schritt 1 funzt alles super. Mit dem folgenden TS werden mir im Schritt
2 zwar die Felder mit * markiert, die benötigt werden, aber wenn sie
leer sind, passiert nichts und man gelangt auf die selbe Seite ohne
finischer und ohne Inhalt - also leere Seite.

plugin.Tx_Formhandler.settings.predef.online_reservation <
plugin.Tx_Formhandler.settings.predef.default
plugin.Tx_Formhandler.settings.predef.online_reservation {
name = Online-Reservierung
templateFile =
fileadmin/templates/plugin.tx_formhandler.online_reservation.html

1.validators.1.class = Tx_Formhandler_Validator_Default
1.validators.1.config.fieldConf {
name.errorCheck.1 = required
email.errorCheck.1 = required
email.errorCheck.2 = email
}

1 {
if {
1.conditions.OR1.AND1 = reservationType=Reservierung 1
# Make settings for step 2
1.isTrue.2 {
templateSuffix = _r1

# validators.1.class = Tx_Formhandler_Validator_Default
# validators.1.config.fieldConf {
# reservationDate.errorCheck.1 = required
# reservationPersonCount.errorCheck.1 = required
# }


}

2.conditions.OR1.AND1 = reservationType=Reservierung 2
# Make settings for step 2
2.isTrue.2 {
templateSuffix = _r2
}

3.conditions.OR1.AND1 = reservationType=Reservierung 3
# Make settings for step 2
3.isTrue.2 {
templateSuffix = _r3
}
}
}

2.validators.1.class = Tx_Formhandler_Validator_Default
2.validators.1.config.fieldConf {
reservationDate.errorCheck.1 = required
reservationPersonCount.errorCheck.1 = required
}
}

Hoffe ihr könnt mir weiterhelfen.

lg ad
_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Reply via email to