how to add "registered by" information to a guest that is being registered manually in the backend?
Looking at the table "civicrm_participant", I can see a field "registered_by_id", which is presumably the one you want.

I'd note that you're using the field in a way that isn't strictly what it was designed for - i.e. you're taking the person who registers someone else and using that as having a particular relationship to them.

So I can think of three solutions:


Reconsider your requirements/architecture - perhaps add a relationship or some other way of connecting the guest to the primary registrant.
Use an indirect way of filling the registered_by_id field, e.g. have  custom registrant/participant field that is only exposed to administrators, and use rules or something like that to fill in registered_by_id when this custom field is filled.
Write an extension that exposes the field to the administrative form.


Short answer: no (no simpler solution).