I've added a geoprocessing service to the Geoprocessing widget in Web AppBuilder. Within the GP tool that was authored in ArcGIS Desktop, I have some custom validation logic written using Python, which works fine when running the GP tool in ArcGIS Desktop, but which is ignored when publishing the tool as a GP service and running it via Web AppBuilder's Geoprocessing widget. The UI for my tool consists of 2 drop-down menus to collect the 2 input parameters from the user. The parameter validation needs to happen before tool execution, and I need the validation logic to update the values in the 2nd drop-down menu based on the value that the user chooses in the 1st drop-down menu.
I think you can achieve this workflow using a script tool in ArcGIS Pro. Configure Field type parameter and set "Dependency" on the input layer.- inside script tool properties.
Hope this helps.