server side success message
Posted: 10 January 2011 02:36 PM   [ Ignore ]
Has a Nice Profile
Avatar
RankRank
Total Posts:  107
Joined  2010-05-07

Hi

I am developing an application using safecracker. I have implemented successfully the ajax type. However the application is targeted for users in government and I anticipate
a lot of machines with javascript disabled. Is there an easy way of implementing a server side based success message “successfully updated the form” etc.

Cheers
Christian

Profile
 
 
Posted: 10 January 2011 08:08 PM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

The easiest way to do that is to have it redirect to a “success” template, or perhaps just add a success url segment and then test for its presence:

{exp:safecracker return="site/form/ENTRY_ID/success"}

{if segment_4 
== 'success'}
You successfuly updated the form
!
{/if} 
Profile
 
 
Posted: 11 January 2011 05:48 AM   [ Ignore ]   [ # 2 ]
Has a Nice Profile
Avatar
RankRank
Total Posts:  107
Joined  2010-05-07

Hi Rob

Clever solution that is. Thanks!

Christian

Profile