In the custom module with grid i am getting error as following :

TypeError: $.data(...) is undefined 

in magento 2 admin form in tab

It was working perfectly without tab and saving form data in database. But, after this i have added form in tab and m not able to save data. When i am saving or save and continue it's giving error as above.

I am using magento 2.1.6 and also run command php bin/magento setup:static-content:deploy but not working.

  • Any solution for this issue?
    – Magecode
    May 22, 2017 at 11:32

1 Answer 1


Please confirm if you are using the following code in your _prepareForm() function


If so, try commenting this code and re-check.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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