How do I use RPCs the right way?

This is what I'm trying to do:

1. User spawns a GameObject
2. A popup window with an InputField appears. The user enters a name and presses the "ok" button.
3. The text from the InputField is added to the GameObject.

My problem right now is that the text is not synced between users.

I know that I have to use an RPC. But I have a hard time understanding how to use an RPC correctly.

For example: Which method should receive the [PunRPC] attribute? Is it the method that takes the text from the InputField and adds it to the GameObject? But where would I call this method from then?

Best regards