In Magento 2.x form use in <iframe src="forms.netsuite.com "> after submitting from netsuite return/redirect to home-page-url/?whence=

I need to show success message in home page:

<div class="page messages"> </div>

enter image description here


In your submit, controller assigns messageManager like below.

$this->messageManager->addSuccess(__('This is a success message.'));

Then you need to assign a placeholder for the message through frontend layout xml used in the module as given below inside the <body> tag.

<referenceContainer name="page.messages">
        <block class="Magento\Framework\View\Element\Template" name="ajax.message.placeholder" template="Magento_Theme::html/messages.phtml"/>
        <block class="Magento\Framework\View\Element\Messages" name="messages" as="messages" template="Magento_Theme::messages.phtml"/>

Note: If you are using ajax submit the form it might not work.

I hope it helps!

  • submit plus all form come from 3rd party netsuite as like as Zoho form in iframe , when submit form got netsuite & redirect to home page as home-page-url/?whence= now need to show massage – matinict Jun 18 at 13:37
  • Have you stored value in the database of this form? have you used API to integrate third-party form? – Chirag Patel Jun 18 at 13:41
  • If possible then share your code what you have done for display form, so based on that give a solution. – Chirag Patel Jun 18 at 13:43
  • not stored value on my db, Its totally external form come via ifram – matinict Jun 18 at 13:44
  • plz check again i upload img – matinict Jun 18 at 13:56

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.