Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经通过使用逻辑钩子完成了它我如何通过视图来完成它。我已经通过逻辑钩子完成了它但是我如何通过仅使用视图以及通过代码来实现它
您是否只想在视图中设置默认值?保存值只能在事后使用钩子完成。如果您想在编辑(或详细视图)中设置默认值,只需在 $this->bean 中设置字段:
class AccountsViewDetail extends ViewDetail { function display(){ $this->bean->mycustomfield_c = 'Default'; ......