It seems that the fork of jqGrid the free-jqGrid is not supported anymore. In this case I can just give you some advice.
The idea is simple.
In case if you have active search filter with certain field (in your case Workplace) , you can simple set the defaultValue option in editoptions.
Since there is a missing documentation for free-jqGrid I can recommend you to see the docs for the supported Guriddo jqGrid here, but you should take care.
Common description of the above.
- Set the recreateForm to true when add a record
- Check if the search is active (search option is true)
- If this is active get the filters parameter and extract the field
and value
- Change the editoptions defaultValue of that field in before
beforeInitData event (of course if this exists in free-jqGrid) using setGridParam method
At first look it seems complicated, but it is not.
If you have any problems with this I can try to prepare a example using Guriddo jqGrid