hello,I am newbii to YII.I want to know how to use CForm in Yii?Actually I want to make a costume form where user will use the features of that form for which I need CForm. In which page I have to use that and is it necessary to make a crud of that page before developing CForm for that?
Hey, are you kidding me or us? Two days ago you asked exactly the same question and I answered you that you should in first way look into documentation, read some, and don’t ask dumb questions without any effort from your side. Yesterday you asked nearly exactly the same question, also doing nothing (like reading documentation or better - running demo application). And right now you are doing exactly the same!
Look, everyone here is keen to help, but not to answer the same answer for hundredth time and not to help someone who is doing nothing, only waiting for ready solution. Everyone here had to spend his time doing some research, testing, reading and only at the very end - asking.
Let me repeat myself. Make a use of demo application!
Go to a folder where you installed your framework and execute yiic script with following arguments:
yiic webapp path
This will generate a demo (base) Yii aplication for you. Go to protected\controllers\SiteController.php and look for actionLogin function to see how generating off login form is done. Then go to protected\views\site\login.php view, which is used in this action, to see how CForm is used to build a simple form.
[b]Let me repeat myself again. RTFM - which can be translated as: Please, be so kind to spare some time on reading very good Yii documentation!
[/b]Please, be warned, that if you ask the same question for third time, without doing nothing from your site, you will get -1 or get ignored.[b]
Kidding aside, ajay, show your interest by doing your homework. Spoonfeeding won’t do you any good in programming, well actually in most aspects of life. If you have only visited the Definitive Guide to Yii, you won’t be asking this not-so-challenging question.
I suggest you get familiar with Yii first before creating your own application. If you are in a rush, then create your application with whatever you are comfortable with. Follow the tutorials, and google around. It will surely benefit you a lot.
Well, I’m trying to calm down, really! :] But if someone is asking exactly the same question third time, my bloodsystems starts to boil. I know many forums, where asking the same, hard question would result in ban. And this guy asked it three times, and as you pointed it to him - it was basic, to not to say - dumb, question… :]