My module has 2 tabs. In one, there is a text field for an API Key
. In the other, a select
field gets populated based off an HTTP request that is made with the API Key. I have all this working fine. However, if the user has not entered an API key, I'd like to display a message to them about the need to do so, rather than showing the empty Options
field.
Screen 1 – API Key
Screen 2 – Options
I'm hoping there is a way to do this purely through system.xml
. I'd also be ok with just injecting some custom JavaScript onto the page, but I'd need instructions on how to do that as well.
Best Answer
It is also possible in UI component with the
<switcherConfig>
. You can refer magento sales rule module form UI component file. I had a same requirement and I did it by using following code.Here
<target>
is yourform_datacomponent_name.section_name.field_name
.