getgrav / getgrav/grav-plugin-data-manager

Error with submitted multiline text

Open
#15 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
32
Forks
18
PR merge metrics
No merged PRs in 30d

Description

As I could see, there is a closed issue about multiline text #2 , but apparently this seems still to be a pending issue. Recently, I was trying to get a full list of all submitted data in a single CSV, but as my standalone solution is tailored to my form, it's not really usable here. But I can give a hint how I have solved it:

The multiline-textarea was the last field of my form. So, when I read the contents of the text data, I split the full content at the label value of the textarea

`$textarea = explode("\r\ntextmessage:",$fulltext,2);`

Then I manipulate all the linebreaks in $textarea[1] which now contains only the value of "textmessage". And then I just implode the array again by using the label value again:

`$fulltext = implode("\r\ntextmessage:",$textarea);`

Now I can handle the remaining linebreaks, as there is only one line per input/textarea.

This could be done globally, maybe referring to the original form values, but as I am not a developer, this seems too much for me to do in this place.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.