⚠ 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 forum is read-only and soon will be archived. ⚠

Problem with the setRelation dropdown.

enterprise setRelation dropdown

  • Please log in to reply
2 replies to this topic

#1 dhouwen



  • Members
  • Pip
  • 2 posts

Posted 04 February 2020 - 12:08 PM

Hi Folks!


I have a problem with the setRelation dropdown.
I'm using the Enterprise version and i need to have the possibility to save an empty value.
$crud->setRelation('officeCode', 'offices', 'city')



When i'm check this example (non enterprise version) there is an option to choose for an empty value.



Whem i'm check the same enterprise example i don't have this empty option.



Does anyone knows how i get this empty value option in the enterprise version?




#2 Soreno



  • Members
  • PipPip
  • 15 posts

Posted 04 February 2020 - 08:47 PM

Hello, dhouwen.

It depends on settings of your database field. If that field has NOT NULL constraint you will not have empty option in your GC.

#3 dhouwen



  • Members
  • Pip
  • 2 posts

Posted 04 February 2020 - 09:39 PM

Hi there,


Thanks for your reply. This is my field setting, still no empty function. Any idea?

`test` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users