Hi to all! Let me just say that I’m from Ukraine, so do not judge me harshly for my English.
So, I had a problem: there is a form on the website, it’s submitted by the user, and then entered data must to put in the right place in the .RTF document. Why .RTF? - Because I was advised that this problem can be solved using standard Yee view.
So, here is what I have managed to do:
create a model where the validation rules of a fields are defined (my fields - is $firstname, $surname, $patronymic, $email);
create a controller, which should render a view of form and in some way the field values must be substituted in the place specified in the template .RTF, which in theory should also already be somewhere on localhost… and here I have promlems…
Well, RTF is really a textual format. I still don’t understand why you absolutely must have an RTF in the end, but it is certainly possible. Just create a new controller action for that and you’re pretty much settled.
For my purposes, select the format of the document is not so important - important outcome. Proposed for save to the user the document should contain the text of the fields (introduced by him) and the attached image (user’s photo), which must also be inserted in a specific location in the document.
Tell me, please, what should be the document template, where it should be on my computer, and how to link it with the controller?
There would be little difference to the usual request cycle. Like all templates, it would have to be present on your server. Do not forget to set appropriate http headers for your output. Have you read through the Definite Guide to Yii yet? It’s also available in ukrainian