retrieve modal dialog value and send it to php using ajax

retrieve modal dialog value and send it to php using ajax

I have form that has one field.
I have one field that is in modal. Both of these are part of the form.
When I fill in the first field and click on submit dialog opens and i enter another value.
Once I click on submit i would like to send both of these values to php using ajax but i am having troubles retrieving these values.
Can suggest how to solve this please.

my code