Aayush
Well-known member
I just realized this issue when I was coding this plugin.
http://xenforo.com/community/resour...s-contest-winner-page-of-day-week-month.2831/
So I was coding this and I encountered an issue while saving the options.
I use a callback for providing the options. I use the xenforo class to get all the groups present. Then I render them in checkboxes using a prebuilt xenforo template.
It works fine till here.
I also use a custom validation of options.
In that I call a function from the model which updates stuff. I am not using any data writer here, just for simplicity sale.
Now whenever I change the select boxes input, I.e. I change the groups allowed within in admin area, and hit save. It saves but the function in model isn't called on validation.
Now when I hit save again without changing the select options, the function in model get called.
http://xenforo.com/community/resour...s-contest-winner-page-of-day-week-month.2831/
So I was coding this and I encountered an issue while saving the options.
I use a callback for providing the options. I use the xenforo class to get all the groups present. Then I render them in checkboxes using a prebuilt xenforo template.
It works fine till here.
I also use a custom validation of options.
In that I call a function from the model which updates stuff. I am not using any data writer here, just for simplicity sale.
Now whenever I change the select boxes input, I.e. I change the groups allowed within in admin area, and hit save. It saves but the function in model isn't called on validation.
Now when I hit save again without changing the select options, the function in model get called.