Yii Framework Forum: gii CRUD generator field type is always text for boolean - Yii Framework Forum

Jump to content

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

gii CRUD generator field type is always text for boolean Rate Topic: -----

#1 User is offline   ha11owed 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 25-July 10

Posted 26 July 2010 - 01:31 AM

I am using gii to generate CRUD operations for a large number of tables, but the generated form uses a text box for the boolean data types [in mysql db that is tinyint(1)] instead of the checkbox.

Is there a tool or extension that can generate the form with appropriate input fields,
or one that can create dropdown for the foreign keys ?
0

#2 User is offline   ignis 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 27-April 10
  • Location:Lithuania - Vilnius

Posted 26 July 2010 - 10:32 AM

I think it always use text field for TINYINT type or ENUM I have checked ;) . You can check gii module in your yii framework and change this default configuration that for tinyint or ENUM is set.
0

#3 User is offline   ha11owed 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 25-July 10

Posted 26 July 2010 - 02:16 PM

View Postignis, on 26 July 2010 - 10:32 AM, said:

I think it always use text field for TINYINT type or ENUM I have checked ;) . You can check gii module in your yii framework and change this default configuration that for tinyint or ENUM is set.


you are right, this is why it uses text field, but the problem is that this is the boolean in mysql.
I didn't manage to find a configuration file for gii, but reading the docs I realized that this kind of functionality isn't implemented yet

So to reformulate my question is there any gii extensions that creates the CRUD forms with custom types (checkbox for boolean) or maybe that create dropdown for foreign keys ?
0

#4 User is offline   PoL 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 506
  • Joined: 05-November 08
  • Location:Buenos Aires, Argentina

Posted 26 July 2010 - 03:04 PM

try this:
Gii Template Collection
Don't say what you think, think what you say
The problem is communication! Excess of communication!
1

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