I assume that you are able to return both tables and fields data to the form, but you are looking the way to make the value in ddl changing dynamically according to what table is selected.
Have you tried adding Filter Data to the repeating group in Ddl box property?