• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: AJAX and PHP Scripting

AJAX and PHP Scripting 8 years 4 months ago #36157

  • robert.wooler
  • robert.wooler's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 1
Hi, i have RSForms Pro on a Joomla 3 installation, all is and has been running fine, however i wanted to implement a piece of code that would email me the contents on two particular fields regardless of whether the user was successful or had to go back and fill in any missing required fields, this is so i know there was someone using the form, and if i dont receive the finished form i would then be aware of a problem

The problem i am have, is i have the following code placed in 'Script called on form process' on the PHP script page

$to = " This e-mail address is being protected from spambots. You need JavaScript enabled to view it ";
$subject = "Possible catcher";
$txt = "" . $_POST = $_POST;
$headers = "From: This e-mail address is being protected from spambots. You need JavaScript enabled to view it " . "\r\n" . "CC: This e-mail address is being protected from spambots. You need JavaScript enabled to view it ";

mail($to,$subject,$txt,$headers);

The problem i have is when AJAX is set to 'OFF' the above script works ok but my custom Javascript doesnt run and if i set AJAX to 'OFF' i dont receive the email notification, but my custom Javascript works

The custom javascript is just a crude bit of code that inserts text in certain areas of the form if the user misses a field out (i have dropdown sections, and whilst collapsed you can see which fields need entries)

I have an onClick="checkCatch()" on the submit button that executes the javascript code, but i dont know how to execute php at the same time

Any ideas on how i can get both the scripts to work together,

I havent suppled a url to see as these get picked up in google, but i can message one if needed

Cheers

Robert
Last Edit: 8 years 4 months ago by robert.wooler.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!