In the servlet where you are handling the request/response, append the ID in the form B path that you created and fetch it in the form.
==>I assume that ID should be added as query param in form B path. I want to show this ID in textbox(added in form fragment in Form B.
==> In this scenario, where we have to read this ID value and display in textbox. Is it from rule editor or some other place?) ]
2. Don't use 2 forms, rather have two fragments. Create button to submit in fragment 1 keeping the fragment 2 hidden, on callback hide the frag1 and set the field of fragment 2(form B in your case).
==>Form A is initial dialog for creating more than 10 different forms. I can't add that Form A and Form B as single fragment in single form because Form B(contains more than 8 childpanels) will be different for 10 different forms.