Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Limiting the size of Dropdown Menus 11 Apr 2016 01:37 #13899

  • koenvdz
  • koenvdz's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 2
I would like to limit the size of a drop down menu with data from a foreign key (table) to a more workable size so I would like to add a where clause in the following code, does it exist or is this possible?

In My view.html.php of the form:

$model_company_id = CkJModel::getInstance('Contacts_1', 'GuidemanModel');
$model_company_id->addGroupOrder("a.name");
$lists = $model_company_id->getItems();

I would like to add a where statement to limit the company names of the country of the user. is there a way to do it?
Koen

Please Log in or Create an account to join the conversation.

Limiting the size of Dropdown Menus 11 Apr 2016 08:39 #13900

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
$model_company_id->addWhere("a.country = " . (int)$myCountry);
Coding is now a piece of cake
The following user(s) said Thank You: koenvdz

Please Log in or Create an account to join the conversation.

Limiting the size of Dropdown Menus 11 Apr 2016 12:41 #13906

  • koenvdz
  • koenvdz's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 2
That does the trick, Thanks for the excellent and FAST support.!
Koen

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.108 seconds

Freakin' Awesome!!! J-Cook is simply awesome - whether you're a highly experienced developer or complete novice whether you're building a small inventory component or a complete community solution! The beauty comes from a fast slick and reliable platform that readily provides developers with everything they'll need to build the backbone of a solid and secure component with wizards for authoring access publishing aliasing created/modified by dates... you name it COOK provides it! J-Cook really surpasses all of the 'competition' as far as MVC tools are concerned! Try love it and get cooking!
learnthrusong (JED)
          

Get Started