This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

m.paniez9292
m.paniez9292

Hi, I would like to make my little contact form :

  • with only input, it works
  • when I put a textarea without its call in my mail template, it works
  • when I put a textarea with its call in my mail template, I have an error : "An exception has been thrown during the rendering of a template ("Object of class Illuminate\Mail\Message could not be converted to string") in "...... my template ......." at line 1." on line 337 of ..../vendor/twig/twig/lib/Twig/Template.php In this last case, I have the post value too (I use dump function).

Thanks

Last updated

FelixINX
FelixINX

Have you take a look at this plugin : Flexi Contact.

Its very simple, but you can customize this file and make it your own.

Hope it's help you!

m.paniez9292
m.paniez9292

Hi, Thanks for your advice. If I don't find a way, I'll try this plugin. But, I would like to build my own. I have only 3 inputs, 1 checkbox and 1 textarea and I have the problem only with the textarea value. Personnaly, I think it's much too heavy for the minimal use I want to do.

m.paniez9292
m.paniez9292

Hi, I find the way : my textarea id and name was "message". This word is used by Laravel, in mail sender. So, I change "message" by "content_message" and it works (help at this link : http://laravel.io/forum/08-14-2014-laravel-mailing-issue-object-of-class-illuminatemailmessage-could-not-be-converted-to-string?page=1). Thanks

dion17018
dion17018

m.paniez9292 said:

Hi, I find the way : my textarea id and name was "message". This word is used by Laravel, in mail sender. So, I change "message" by "content_message" and it works (help at this link : http://laravel.io/forum/08-14-2014-laravel-mailing-issue-object-of-class-illuminatemailmessage-could-not-be-converted-to-string?page=1). Thanks

This worked for me, thanks

swt83
swt83

dion17018 said:

m.paniez9292 said:

Hi, I find the way : my textarea id and name was "message". This word is used by Laravel, in mail sender. So, I change "message" by "content_message" and it works (help at this link : http://laravel.io/forum/08-14-2014-laravel-mailing-issue-object-of-class-illuminatemailmessage-could-not-be-converted-to-string?page=1). Thanks

This worked for me, thanks

This also worked for me.

1-6 of 6

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.