Jump to content


Problem with dropdown

dropdown field_type

  • Please log in to reply
4 replies to this topic

#1 elfuego1

elfuego1

    Member

  • Members
  • PipPip
  • 24 posts

Posted 12 February 2013 - 07:52 PM

Hi,

 

I wanted to use dropdown, but when I add this code:

$crud->field_type('my_field','dropdown', array('1' => 'active', '2' => 'private','3' => 'spam' , '4' => 'deleted'));
 


these 2 errors show up on the list page:

 

Severity: Notice

Message: Undefined property: stdClass::$extras

Filename: libraries/grocery_crud.php

Line Number: 291

 

Severity: Warning

Message: array_key_exists() expects parameter 2 to be array, null given

Filename: libraries/grocery_crud.php

Line Number: 291

 

I get this errors on CI rev. 2.0.3 and 2.1.3.

 

Can you help me with this?



#2 tlc033

tlc033

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts
  • LocationChisinau

Posted 12 February 2013 - 08:42 PM

What version of GC do you use ?


We are a web company from Republic of Moldova and offers services as, web design, web development, eCommerce, online marketing and advertising, consulting and web optimization, search engine optimization (SEO) and social media optimization (SMO), branding and rebranding.

 

          logo_small.png  

                         elitiv.com  

                  

 

 


#3 elfuego1

elfuego1

    Member

  • Members
  • PipPip
  • 24 posts

Posted 12 February 2013 - 09:17 PM

Latest.

In library file "grocery_crud.php" it sais:

@version        1.3



#4 tlc033

tlc033

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts
  • LocationChisinau

Posted 12 February 2013 - 09:46 PM

For my work OK, possible error is elsewhere.

 

Show you controller function, can anyone find the error.


We are a web company from Republic of Moldova and offers services as, web design, web development, eCommerce, online marketing and advertising, consulting and web optimization, search engine optimization (SEO) and social media optimization (SMO), branding and rebranding.

 

          logo_small.png  

                         elitiv.com  

                  

 

 


#5 elfuego1

elfuego1

    Member

  • Members
  • PipPip
  • 24 posts

Posted 12 February 2013 - 10:53 PM

Problem solved!

 

Your suggestion that it's not the incompatibility of CI and GC rev. gave me an idea.

In my controller I was trying to apply field_type method to field from table I joined in my model.

I found a workarround for THAT.

Fortunately I have a field in main table that I can use instead.

 

Thanks for your help.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users