Write persian directly in a form text field

I want to know how to write Persian (language) directly in a text field…

You need to be more specific.

What do you mean by “writing (…) in a text field”?

Allow users to write? Write programmaticaly? What text field? Form element? Database?