• 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: Delete front end message

Delete front end message 9 years 10 months ago #31614

Hi I have successfully implemented the delete from front-end submissions by following the guide here www.rsjoomla.com/support/rsform-pro/freq...age-directories.html

Now I simply want to add a success message to the user saying 'successfully deleted'. How do I achieve this?

Thanks
Last Edit: 9 years 10 months ago by johnnyboi_123.
The administrator has disabled public write access.

Delete front end message 9 years 10 months ago #31622

  • cosmin.cristea
  • cosmin.cristea's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 756
  • Thank you received: 144
Add this script to the bottom of the default_layout.php and let me know if it works.
<script>
 
jQuery(document).ready(function($){
	var deleteLink	= $('.delete_link');
	deleteLink.click(function(event){
	var parent	= $(this).parent().parent();
		event.preventDefault();
		$.ajax(this.href, {
      success: function(data) {
				parent.slideUp().remove();
				$('#system-message-container').append('<div class="alert alert-success"><button type="button" class="close" data-dismiss="alert">&times;</button><h4>Success!</h4>Entry deleted</div>')
      },
      error: function() {
				$('#system-message-container').append('<div class="alert alert-error"><button type="button" class="close" data-dismiss="alert">&times;</button><h4>Warning!</h4>Entry could not be deleted</div>')
      }
   });
	});
});
 
</script>

PS: I forgot,

add the delete_link class to the existing button (after line 39)
// should look like this:
<a class="delete_link" href="<?php echo JRoute::_('index.php?option=com_rsform&formId='.$this->params->get('formId').'&action=delete&id='.$item->SubmissionId); ?>">Delete</a>
My help is not official customer support. To receive your support, submit a ticket by clicking here
Last Edit: 9 years 10 months ago by cosmin.cristea.
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!