minor
if form is requested by bibdk_modal $branchid want be passed as a paramter but will be set in the $form_state array