Yii Framework Forum: CAutoComplete - $_POST - Yii Framework Forum

Jump to content

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

CAutoComplete - $_POST Rate Topic: ***** 1 Votes

#1 User is offline   Stijn 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 04-February 09
  • Location:Belgium

  Posted 01 March 2010 - 10:50 AM

When I use the CAutoComplete in a form and hit the submit button, my textfield is always empty ...

He never remember what I search by the AutoComplete field.

How can I tell the CAutoComplete width that he must remember the entered / found info?

I attached to widget a model and used $searchform->attributes = $_POST['Search'];, but non of these worked ..
0

#2 User is offline   Stijn 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 04-February 09
  • Location:Belgium

Posted 02 March 2010 - 02:45 AM

Hmm nobody?
0

#3 User is online   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,857
  • Joined: 04-October 08
  • Location:DC, USA

Posted 02 March 2010 - 07:27 AM

How do you use CAutoComplete? Did you set its model and attribute properties?
0

#4 User is offline   Stijn 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 04-February 09
  • Location:Belgium

Posted 02 March 2010 - 07:41 AM

View Postqiang, on 02 March 2010 - 07:27 AM, said:

How do you use CAutoComplete? Did you set its model and attribute properties?


Yes I use the model attribute

But I fixed it by using the value attribute that I fill with the $_POST value
0

#5 User is offline   luis diego 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 02-February 10
  • Location:Costa Rica

Posted 25 March 2010 - 09:36 AM

I recommend you to use Firebug (Firefox's addon) to debug and see the $_POST content.
That can help you to know what is happening...
0

#6 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 25 March 2010 - 10:43 AM

Are you sure that the attribute is safe?

There is a validator on this attribute?
0

#7 User is offline   Stijn 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 48
  • Joined: 04-February 09
  • Location:Belgium

Posted 25 March 2010 - 10:48 AM

View Poststijnh, on 02 March 2010 - 07:41 AM, said:



But I fixed it by using the value attribute that I fill with the $_POST value



;)
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