[TYPO3-german] formhandler multistep

ad webmaster at adgrafik.at
Thu Jun 24 18:08:09 CEST 2010


Sehe gerade, dass das ein bekannte Problem ist, dass mit der nächsten 
Version behoben ist: http://forge.typo3.org/issues/show/7335

Damit passt jetzt einmal alles.

lg ad

Am 24.06.10 18:00, schrieb ad:
> 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


More information about the TYPO3-german mailing list