Reputation: 1
I am using addresscomplete pcf control on a single line text field 'Address' enter image description here
I want to disable addresscomplete conditionally. For e.g. if Age < 18 disable addresscomplete on field Address.
I tried disabling the field Address using javascript but it is still allowing search in the field.
Upvotes: 0
Views: 81
Reputation: 5446
In order to enable/disable control based on some client-side logic you have to handle it in the code of your control. In order to react on client-side enabling/disabling you should bound disabled property of your component to context.mode.isControlDisable of the context of your PCF control.
Upvotes: 0