1
  1. 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 using ajax_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.? – Viraj May 6 '15 at 6:27
0

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.

| improve this answer | |
  • 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. – Viraj Apr 30 '15 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.