I have a backend form where one of the text inputs is dependent on another field. Using the depends option in fields.yaml I can see that the form::onRefresh funciton is used to send the form data, and the field that has the depndency. What I can't figure out is how to access that from my plugin controller - I need to do some custom bits and bobs and return something to the text input.
I've tried using an index_onRefresh() function as we use index_onDelete() but that doesn't seem to kick in.
The RainLab users plugin uses the depends field on the state dropdown. This is handled in the model using the getFieldOptions() function - I'm using a text input so can't use this. The only thing I can think of doing at the moment is to create a widget and use that instead of the text input and just catch the post. Gut says that's probably not the best way?
Cheers,
Adam