How many input fields in one raw of a form?

Hey guys,

I’m currently designing a template for forms on a governmental website. This kind of template can contain lots of input fields so I don’t want the user to scroll a lot. Also, the forms are in a slide-out pane (not on the full-screen, as you can see from the image I attached), so I have limited space. How many input fields should I put in one raw? Right now I set “ID num”, “First Name” and “Last Name” aligned to the same raw.

What do you think?
Do you have any article or resource that talks about that?

Thanks <3