I have a form which directs the user to a thankyou page with the next event that my customer is running. I would like to send the content of this page (just the text) via email as a response.
I've added the email template, but need to know how to grab the content of the article and insert it.
Thanks
Hi petersen,
I think I replied to this in a PM?
You can get the article contents from the jos_content table, the text is in the introtext and possibly the fulltext columns.
Bob
Yes, thanks Bob.
How do I push the content into the email? I'm guessing in the onsubmit before? Does the email just have a variable I need to append?
Ah of course. Will give a go.
Thanks Bob.
Hi Bob,
I tried the code, but initially only got {article_text} output in the email. I then wondered if it was that the field didn't exist in the actual form so I added it to the HTML and I got an empty email.
Debug info doesn't show the field either. The field contains HTML. Could that be a problem?
Form passed first SPAM check OK
Form passed the submissions limit (if enabled) OK
Form passed the Image verification (if enabled) OK
Form passed the server side validation (if enabled) OK
$_POST Array: Array ( [contactname] => XXXXX [email] => XXXXXX [telephone] => XXXXXX[message] => Test [chrono_verification] => qfmmi [submit] => submit [8018c11175337d2e09acbe108837247c] => 1 [1cf1] => a4acf1b1c6ae8769886c816692c6f65a [chronoformname] => contactus )
$_FILES Array: Array ( )
Form passed the plugins step (if enabled) OK
An email has been SENT successfully from (XXXX)XXXXXX to XXXXXX
An email has been SENT successfully from (XXXX)XXXXXX to XXXXXX
Debug End
Hi petersen,
Silly question, but have you got the article ID OK - the XXX in my code?
You shouldn't need to have the article_text in the Form HTML.
I'll try and run a test here later. Have to go run some errands right now.
Bob
Hi peteresen,
Ooops, sorry. I went back and fixed my post in case I try to use it again.
Bob