Pre-fill field on the "New Value" popup form

Pre-fill field on the "New Value" popup form

I have a form which has a "Course Category" Lookup Dropdown and a "Course Title" Lookup Dropdown. They are "cascading" meaning that the "Course Title" list will be filtered based on the selected "Course Category".



The "Course Title" dropdown also has a "Add New Value" option selected so that I can add a new Course if I want to but when I click that link it opens the "Add New Course" popup but without the "Course Category" selected.



Since the user already has selected a "Course Category" in the initial form, and he intends to add a new Course that is part of this selected "Course Category" I need to find a way to pre-fill the "Course Category" in the popup with the selected Category - would be best if I could pre-fill it AND hide it too.



Is  there any way I can pass the selected course category to the "Add New" popup? And is there a way in the "Add New Course" form that I can identify if the form is triggered directly or as a popup from another form?

Any help would be greatly appreciated.

Regards,
Fadi