[TYPO3-english] new form typo3 4.7
Christoph Holtermann
c.holtermann at gmx.de
Thu Sep 6 22:51:16 CEST 2012
Am 06.09.2012 21:45, schrieb François Suter:
> Hi Christoph,
>
>> Seems to be possible to make the form return error and
>> set the error message to null.
>
> Great that you found a solution. How did you achieve that? I must admit that I have no experience with the new Form object.
>
> Cheers
>
My config for the form sysext goes like this:
action = post
id = id
method = post
title = title
prefix = tx_form
confirmation = 0
postProcessor {
1 = mail
1 {
recipientEmail = email at something.org
senderEmail = otheremail at something.org
}
}
10 = TEXTLINE
10 {
name = feld
label {
value = Termin
}
}
20 = SUBMIT
20 {
name = form
value = Submit form
}
rules {
10 = date
10 {
element = feld
showMessage = 0
error = TEXT
error {
value =
}
}
}
I have a textline to post a date. The date format is different from that
configured in typo3 so it is not recognized as a date. I want to have
an error. I would need some better error. One that always works. But
this works for me now. I need that error because then i don't get the
other screen which tells "message successfully sent". Having looked
at the source it seems to me that the normal way is to send an email
according to the form data and then show that confirmation message
(or the other one where the user is asked to confirm the data to be
submitted). This is not shown with faulty input. The POST is done
anyway. So (weird as it seems) having faulty input does the trick.
If someone can tell me a cleaner way, please do so.
The error message is zero so there is no disturbance through that.
No email is sent in this way. So maybe the postprocessor could be left
blank anyway. This config is not clean yet anyway. It just works.
Regards,
C. Holtermann
More information about the TYPO3-english
mailing list