I'd like to put a yui treeview inside of an add.ctp view in a cakephp application. I've got the treeview displaying fine but I'm trying to get a handle on how I can incorporate the treeview selected nodes with the post data that gets submitted by the cakephp view.
2条回答 默认 最新
- dongxuan1660 2011-01-26 19:23已采纳
I solved the same problem using JSON:
点赞 打赏 评论分享
- Add the JSON string to a hidden field with the DOM properties
- dongzun9958 2011-01-27 18:20
Yes - I think that is essentially what I did. I added an onsubmit() function that would grab the values from the treeview using treeview.getNodesByProperty() and then would populate a hidden control in the form.点赞 打赏 评论分享