Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurs while trying to browse data with submitted multiline text #2

Closed
dimayakovlev opened this issue Sep 15, 2015 · 5 comments
Closed
Assignees
Labels

Comments

@dimayakovlev
Copy link

This is form.md:


---
title: A page with a form
form:
    name: contactform
    fields:
        - name: name
          label: Name
          placeholder: Enter your name
          autofocus: on
          autocomplete: on
          type: text
          validate:
            required: true

        - name: email
          label: Email
          placeholder: Enter your email address
          type: text
          validate:
            rule: email
            required: true

        - name: message
          label: Message
          placeholder: Enter your message
          type: textarea
          validate:
            required: true

    buttons:
        - type: submit
          value: Submit

    process:
        - save:
            fileprefix: contact-
            dateformat: Ymd-His-u
            extension: txt
            body: "{% include 'forms/data.txt.twig' %}"
        - message: Thank you from your feedback!

---

# Nice contact form

{% include 'forms/form.html.twig' %}

There is no additional configuration of Data Manager and Form plugins.

If multiline message was submitted, then error occurs while trying to browse Contactform data:
Error

@flaviocopes
Copy link
Contributor

Thanks for reporting! Just recreated on my local form too

@flaviocopes flaviocopes self-assigned this Sep 15, 2015
@flaviocopes
Copy link
Contributor

The problem is how we store data. I've done some edits to transform a multiline string (e.g. a textarea content) to a single line string with <br> tags. Still something left to sort out, but will be fixed soon.

@flaviocopes
Copy link
Contributor

Should be solved in the next Form, Data Manager and themes releases (changes involve those 3 elements). Which theme are you using?

Data generated wrongly will still generate errors (need to manually edit it to work), but new data entered will now work fine.

@vistamedia
Copy link

Hi guys, any news on a fix for that? Or any idea on way to escape all newlines and linebreaks of the submitted textarea?... Cheers. Grav rocks!!!

@dimitrilongo
Copy link

it seems the bug is still here, anybody have a workaround ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants