× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

Saving a new item and custom code

9 năm 2 tuần trước - 9 năm 2 tuần trước #1065 bởi John-Paul Takats
Saving a new item and custom code was created by John-Paul Takats
I am a bit rusty with the component creator as I haven't used it for a year but I am wondering what may be the easiest / best way to add some custom PHP code that is executed while saving a new item in the joomla backend view.  I have a table I created using the component creator that stores a user profile. Upon saving I have some custom code that I would like to run (in my case it will check with our email campaign tool and see if the user exists, but it could do anything).  Things just get confusing with Joomla's API and JTable, JForm, when you haven't used it for a while.  Are there plugin events that are fired so that I could create a plugin for the OnFormSave?  Or would I have to modifiy the code somewhere in the administrator?  I cannot fine a save function anywhere, so not sure where would be best to modify.

Thanks,
JP
Last edit: 9 năm 2 tuần trước by John-Paul Takats.

Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.

9 năm 2 tuần trước #1066 bởi John-Paul Takats
Replied by John-Paul Takats on topic Saving a new item and custom code
The closest thing I can find to modify may be in the: administrator/my_component_name/tables/mytable.php file which contains functions such as bind(), check(), publish().  There is no save that I see.  Would it be best to just change code in this file perhaps, but which function to use?  I suppose if I do future upgrades I will need to be careful, but I can manage that if I cant do an override and am forced to change 'core' code.

Vui lòng Đăng nhập hoặc Tạo tài khoản để tham gia cuộc hội thoại.

Thời gian tải trang: 0.053 giây
Powered by Kunena Forum

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.