Attach or embed node add form with a view

守給你的承諾、 提交于 2019-12-11 04:53:50

问题


I am using Drupal 7.54. I want to attach or embed a node add form to a view so that when a user submits the form, the view below the form will be updated in realtime via ajax. The form will be shown above the view. My view block name is Statuses Stream.

I tried Form block module and putting the form in the header section of my view using views ui, but after submit, it was redirecting to the node created page.

Then I tried Advanced Form Block module. I created a form using AFB module. The form name is Statuses. It is submitting the form with ajax, but it is not updating the view in the realtime. I have to refresh the page manually to show the created node below the form.

I am open to any solution programmatically or through a module.

Note: For those who know, I am trying to mimic the statuses module. It does exactly what I am looking for. The problem began when I came to know that it is not an entity. So now I am trying to make the same functionality with Content type.


回答1:


You could use something like Views Refresh to manually update the view below instead of refreshing the page.



来源:https://stackoverflow.com/questions/44497392/attach-or-embed-node-add-form-with-a-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!