Powerful Form Handling
Setting up a contact or mail form is very easy. The layout of forms is handled centrally, which allows editors to focus on the content of the form.
Contactform
prefix = tx_form
confirmation =
postProcessor {
1 = mail
1 {
recipientEmail =
senderEmail =
}
}
10 = FIELDSET
10 {
10 = TEXTLINE
10 {
name = name
label {
value = Name
}
}
20 = TEXTLINE
20 {
name = email
label {
value = E-Mail
}
}
30 = TEXTAREA
30 {
cols = 40
rows = 5
name = enquiry
label {
value = Your enquiry
}
}
40 = CHECKBOX
40 {
name = get-in-touch
value = yes
label {
value = Do you want us to get in touch?
}
}
50 = SUBMIT
50 {
name = submit
value = Send Feedback
}
}
rules {
1 = required
1 {
breakOnError = 0
showMessage = 1
message = *
error = This field is required
element = name
}
2 = required
2 {
breakOnError = 0
showMessage = 1
message = *
error = This field is required
element = email
}
3 = email
3 {
breakOnError = 0
showMessage =
message = (john.doe@domain.com)
error = This is not a valid email address
element = email
}
4 = required
4 {
breakOnError = 0
showMessage = 1
message = *
error = This field is required
element = enquiry
}
}
confirmation =
postProcessor {
1 = mail
1 {
recipientEmail =
senderEmail =
}
}
10 = FIELDSET
10 {
10 = TEXTLINE
10 {
name = name
label {
value = Name
}
}
20 = TEXTLINE
20 {
name = email
label {
value = E-Mail
}
}
30 = TEXTAREA
30 {
cols = 40
rows = 5
name = enquiry
label {
value = Your enquiry
}
}
40 = CHECKBOX
40 {
name = get-in-touch
value = yes
label {
value = Do you want us to get in touch?
}
}
50 = SUBMIT
50 {
name = submit
value = Send Feedback
}
}
rules {
1 = required
1 {
breakOnError = 0
showMessage = 1
message = *
error = This field is required
element = name
}
2 = required
2 {
breakOnError = 0
showMessage = 1
message = *
error = This field is required
element = email
}
3 = email
3 {
breakOnError = 0
showMessage =
message = (john.doe@domain.com)
error = This is not a valid email address
element = email
}
4 = required
4 {
breakOnError = 0
showMessage = 1
message = *
error = This field is required
element = enquiry
}
}