Change inline formset API to handle position in the screen

Ticket:	#5352