Yii Framework Forum: Chtml::textfield Doesn't Get String, Just Gets Number - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chtml::textfield Doesn't Get String, Just Gets Number Rate Topic: -----

#1 User is offline   Trinh Duy Hung 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 73
  • Joined: 26-October 12

Posted 30 June 2013 - 09:28 AM

Hello !

I have following code:

echo CHtml::beginForm(); 
						echo CHtml::textField('driver_available_since','', array('size'=>100,'maxlength'=>50), array('class'=>'special-textfield'));    					
						echo CHtml::hiddenField('id', ''.$driverArrayId1[$j]);
            			echo " ";
            			echo CHtml::ajaxSubmitButton (
							'Add',			
							Yii::app()->controller->createUrl("session/updateDriverAvailable"),             
				           
							array(
		                    	'name' => CHtml::encode('button'.$driverArrayId1[$j]),
		                    )
				        );
						echo CHtml::endForm(); 



I don't know why when I enter number in the textField thing is ok, but when entering text, the text doesn't pass to controller action.

Any suggestion would be appreciated.
0

#2 User is offline   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,670
  • Joined: 04-March 10
  • Location:UK

Posted 01 July 2013 - 04:12 AM

You should probably post the code from your controller.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users