Forms

hi everybody

i’m new to yii

so please i need kind treatment :)

I want to know how to bind certain form with certain action without model class

that’s all till now !

thanks in advance

Hi

You have no pass any model class but if you form action blank than it take default running action for eg. you have run XYX/index than it take action in for if you will post your data will fetch from XYX controller adn actionIndex() function

Thanks

thanks for your reply Pravin Gajera

but i think u didn’t get my point …

i want to select a certain action for a certain form??

the case now : i want to make a form with a textfield and button

i want to fire certain action when i press on this button and use the value of the textfield in the action method

Hi Mohamed,

I’m fairly new to yii, hope you’re enjoying it as much as I am!

As I understand it, you should use CFormModel for a form without a database model: http://www.yiiframework.com/doc/guide/1.1/en/basics.model

Hope I’ve not misunderstood your question.

Peter

u can use chtml

ex :


<?php echo CHtml::textField('Text', 'some value'); ?>

to get value in controller


$text = $_POST['Text']