About This Ticket

Don’t Display Success Message

by Mukefax / November 12, 2014, 12:43 pm

Hey,

is there a way to remove the success page? I want the form data to be sent, without displaying the success page. 

Regards

Andi

 

Staff

There's no way to do this user the admin panel I'm afraid, you'd need to modifythe API controller (/application/controllers/api.php) and remove the code that displays the success message.

can u tell me what to remove?

Regards

Staff

Assuming you haven't made any other modifications to the controller yet, look for "redirect( site_url("api/sent") );" on line 498 and comment this line out. That should do the trick.

if i comment out this line, i'm redirected to an empty site. (like this: www.example.com/php/index.php/api/email id) i want the form to send the data but stay on the same site.

Regards

Staff

Yes, if you remove the response message, you will be looking at an empty page.

I think what you're looking to do is submitting the form using Ajax, so you would leave the original page. This could work, however you need to set this up on your original page, there's nothing the API can do for you (it only receives the data).