Topic: how can i paginate using rjs in a form?

i am building an app and would like to paginate pictures and a form. this way, the user can select what photos he/she wants to add to a post. however, my searches have lead me to only examples where the action is for photos only. how about when the action calls a form and the paginate action basically would call that same form action? how to paginate using a new action?