rhythmagency / formulate

An advanced form builder for Umbraco.
MIT License
92 stars 50 forks source link

Line breaks do not work #214

Closed V414 closed 2 years ago

V414 commented 2 years ago

In brief, formulate v3.5.2 does not respect line breaks that are in a text area when submitting a contact form. This makes a carefully written email on the users end, e.g.

"Hi,

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Curabitur fringilla tincidunt condimentum. Donec eros tortor, porta ac sapien vel, convallis accumsan neque. Aliquam ut dapibus sapien. Suspendisse sit amet maximus magna, non sodales dolor.

Nam sollicitudin interdum velit, id scelerisque dolor tincidunt ut. Curabitur sed sapien ut nisl suscipit aliquam. Nunc dignissim, quam eget lobortis hendrerit, mi urna interdum risus, non lacinia arcu velit sed magna. Fusce vitae nulla in eros congue efficitur. Nullam sed dapibus elit, a suscipit diam.

In sodales luctus eros, eget pulvinar mi vulputate at. Phasellus eu turpis sed nunc dictum consequat. Nulla id mi consectetur, commodo sem in, convallis purus. Mauris porta elit ac vestibulum efficitur. Aenean nec bibendum mi. Nam sagittis turpis id ipsum aliquet tincidunt. Phasellus at lobortis mi. Curabitur quis odio neque.

Sed condimentum arcu eu turpis tincidunt, ut tincidunt libero interdum. Nulla egestas odio in ex consectetur ultricies. Pellentesque suscipit tincidunt nibh, vitae ullamcorper massa pellentesque in."

Turn into this instead:

"Contact Message: Hi, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fringilla tincidunt condimentum. Donec eros tortor, porta ac sapien vel, convallis accumsan neque. Aliquam ut dapibus sapien. Suspendisse sit amet maximus magna, non sodales dolor. Nam sollicitudin interdum velit, id scelerisque dolor tincidunt ut. Curabitur sed sapien ut nisl suscipit aliquam. Nunc dignissim, quam eget lobortis hendrerit, mi urna interdum risus, non lacinia arcu velit sed magna. Fusce vitae nulla in eros congue efficitur. Nullam sed dapibus elit, a suscipit diam. In sodales luctus eros, eget pulvinar mi vulputate at. Phasellus eu turpis sed nunc dictum consequat. Nulla id mi consectetur, commodo sem in, convallis purus. Mauris porta elit ac vestibulum efficitur. Aenean nec bibendum mi. Nam sagittis turpis id ipsum aliquet tincidunt. Phasellus at lobortis mi. Curabitur quis odio neque. Sed condimentum arcu eu turpis tincidunt, ut tincidunt libero interdum. Nulla egestas odio in ex consectetur ultricies. Pellentesque suscipit tincidunt nibh, vitae ullamcorper massa pellentesque in."

I originally posted on the Umbraco forums about this issue: https://our.umbraco.com/packages/backoffice-extensions/formulate/formulate-questions//108202-formulate-line-breaks. But it also looks like other people have had similar concerns about large chunks of text becoming one line (and removing line breaks) in the comments on this other issue: https://github.com/rhythmagency/formulate/issues/83

I've never done a pull request on somebody else's repo, but this has been bothering me for a while, so I'll certainly give it a shot at fixing it myself (but no promises).

Nicholas-Westby commented 2 years ago

Yeah, a pull request would be great.

Side note: both of those links in your issue are to the same page.

V414 commented 2 years ago

Hey, I think I've fixed this, but I can't push my local branch to the git. Do I need permission from someone?

Nicholas-Westby commented 2 years ago

The way pull requests work is that you fork the repo (essentially meaning you create a copy of it on GitHub), then you make your changes locally, then you push your local changes to your forked repo, then you submit a pull request so that your changes from your forked repo are requested to be integrated into the primary repo. I (or a fellow maintainer) would then review your pull request and either provide feedback or we'd merge in the pull request.

V414 commented 2 years ago

Thanks, I've created a fork now - and hopefully a working pull request. https://github.com/rhythmagency/formulate/pull/215

Nicholas-Westby commented 2 years ago

This has been released in the latest version of Formulate.