⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

beta 1.4.0 from github field_type set and multiselect doesn't works



drfunk
  • profile picture
  • Member

Posted 26 June 2013 - 12:07 PM

i am using the last beta from github dropdown works well but set and multiselect don't want to be written in database ((

 


drfunk
  • profile picture
  • Member

Posted 27 August 2013 - 07:07 AM

be aware!

 

if you use field_type multiselect or set with 

->callback_insert(array($this,'callback'))

->callback_update(array($this,'callback'))

then you have manually implode your filed cause you will receive an array in your callback with multiselect or set, field types

 

anyway it would be great if the manual pointing this out ))


davidoster
  • profile picture
  • Member

Posted 27 August 2013 - 08:16 AM

Hello and welcome to the forums [member=drfunk].

Are you using the very latest version that has being updated just yesterday (26th Aug 2013) after some bug fixes?

Can you please check and let us know if this problem still exists, with the latest, as decribed above, version and if not showcase the problem again?

 

Thanks.


drfunk
  • profile picture
  • Member

Posted 27 August 2013 - 12:29 PM

ye i use now the latest version..! i am not sure that is a bug... 

it looks like this

 

in "grocery_CRUD_Model_Driver" db_insert() and  db_update() both methods implodes an array from form in case of field_type() "set" and "multiselect" only if $this->callback_insert === null respectively $this->callback_update === null

 

else as I wrote earlier callback received an array and not a string this is unexpected behavior cause it only in the case of field_type() "set" and "multiselect" with callback

 

I hope I can help with that

 

Grocery_CRUD.php(latest from git) code lines (around): 866, 876, 918, 963, 981, 992, 1039, 1086


davidoster
  • profile picture
  • Member

Posted 27 August 2013 - 15:41 PM

Ok! I will have to come back to you for this later this week.

I need to check it.

If you would like you can post an issue here.


web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 27 August 2013 - 18:52 PM

Hello [member='drfunk'],

 

I will check your issue and I will get you back

 

Cheers

Johnny


web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 27 August 2013 - 19:23 PM

Hello again,

 

I've checked your issue and this is actually a normal behavior. If you are using a callback is better not to use it with a type (e.g. relation, or change_type) as it will cause unexpected behaviors as yours.


drfunk
  • profile picture
  • Member

Posted 27 August 2013 - 23:21 PM

Hello again,

 

I've checked your issue and this is actually a normal behavior. If you are using a callback is better not to use it with a type (e.g. relation, or change_type) as it will cause unexpected behaviors as yours.

i would say this post should be put in the actual documentation 

in section callback_insert , callback_update  :rolleyes: