Hello everyone!
I'm stumbling upon a form, again... I'm trying to get the Text out of my Form with the newline characters. I'm using PW 2.5.3
What I have in Code a little bit cut down:
$form = $modules->get("InputfieldForm");
$form->action = "./";
$form->method = "post";
$form->attr("id+name",'subscribe-form');
// create a textarea input for the actual message
$field = $modules->get("InputfieldTextarea");
$field->label = "Nachricht";
$field->attr('id+name','message');
$field->required = 1;
$form->append($field); // append the field to the form
// form was submitted so we process the form
if($input->post->submit) {
$message = $sanitizer->textarea($form->get("message")->value);
$out .= "<strong>Nachricht:</strong></br>";
$out .= $message."</p>";
} else {
// render out form without processing
$out .= $form->render();
}
I can't get it with newlines, what am I doing wrong?
Thanks in advance for your support