I am opening my registration form in ctools modal popup. I have applied custom module to get that popup.
Once user submit any form ajax window will be dismiss using
ctools_modal_command_dismiss()
.As window will be closed, status message will be printed usingajax_command_append('.ctools-use-modal',theme('status_messages')
.But the status message get printed twice. I had tried to unset session messages. but it was not working.
-
Is two menu callback could be the reason of it automatically printed it twice.?– VirajMay 6, 2015 at 6:27
1 Answer
The function drupal_set_message takes 3 parameters, message, type and repeat. Default repeat is TRUE. If you set it to FALSE, it will prevent duplicates.
-
In that case,status message will appear inside popup after submitssion.So if you want to look at status message then again you need to click on link which opens a popup. Their is no message get printed on the landing page.My point is,after submitting form, the form will be disappeared and status message will be appeared on landing page and it should be printed single time only.– VirajApr 30, 2015 at 7:57