frontend - TYPO3 Extbase FE form - how to remove/delete inline relation
问题描述
I have a complex custom Extbase Database on which I am doing a frontend (FE) editor with subtables. With the propertyMappingConfiguration allowCreationForSubProperty I was able to implement an easy way for the user to add new sub-records in M:n relation.
Now my question is how can I implement a deletion of those records? Simply removing the properties from the FORM (in my case removing tx_jobfinder_jobanzeige[jobanzeige][sprachkenntnisse][2][niveau]) from the html-form does obviously not trigger a delete event for this sub-table entry.
Is there a way to automatically trigger it via extbase? How would I implement that? Setting tx_jobfinder_jobanzeige[jobanzeige][sprachkenntnisse][2] to null or how would that be possible?
解决方案
以防有人遇到同样的问题或询问这是如何完成的。我发现了隐藏的问题。在编辑表单中,用户可以删除这样的连接,并通过 javascript 我删除选择但您还必须删除隐藏字段 [__identity] - 然后通过级联 Extbase 自动更新对象,所有内容都将正确保存。
推荐阅读
- git - 如何强制 git rebase 并覆盖合并冲突
- web2py - web2py 是否将“en”翻译成“en”
- python - 获取 AttributeError:模块“pandas”在调用方法“访问 OutbreakLocation 数据”时没有属性“json_normalize”
- ruby-on-rails - 在 capistrano 部署到Passenger / Apache env 后,Rails5 应用程序丢失会话,在 Rails 4 上运行良好
- reactjs - 处理从 React 应用程序到 NodeJS 后端的长时间运行的发布请求时的建议
- php - 路由/API 约定问题
- angularjs - 无法在 Angular 应用程序中显示 PDF 文件
- apache-kafka - 在 Windows 上删除 Kafka 主题内的数据的步骤?
- jquery - 箭头未显示在 jQuery 颜色框中
- javascript - 从浏览器中的实时表记录数据