Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7628709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:38:45+00:00 2026-05-31T05:38:45+00:00

I am stumped beyond belief. I have a select box being generated by the

  • 0

I am stumped beyond belief.

I have a select box being generated by the cakephp form helper. I am feeding it an array of options, and passing an empty value… pretty standard stuff.

However, my “empty” field is showing up at the very bottom of the list.. not the top. So when the field loads, it just defaults to the first option… which is not the “empty” option.

Not a whole lot of room for error on the code here..

echo $this->Form->input('whatever',array('empty'=>'Choose One','options'=>$categories));

The only small item that might be important, is that $categories is a multi-array, so the select box has optgroups & options.

Is there some quirk/bug out there that I do not know of that is trying to force me to sneak into my scotch supply a few hours ahead of schedule?

edit: using the latest release of cakephp 1.3.x

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:38:46+00:00Added an answer on May 31, 2026 at 5:38 am

    I think that I once had the same problem.
    It turned out to be the data (options array).

    Is there an option with an empty key? probably the last one then.
    this lead to the scenario I remember and seems to be the exact same thing.
    the form helper will override this empty key value pair then and not create a second one.

    without more infos from your end this will be difficult to solve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Stumped by this one: I have a function that returns an array of folders
I am completely stumped. I have a program that pulls information stored in a
I'm completely stumped on this one. I have three different lists that need to
Autoconf has gotten me stumped. I have tried modifying the COMPILE in Makefile.in as
I'm stumped here. I have an observable collection that holds business objects. I have
Stumped here. Posted a similar question before. We have a pretty large WPF app
Stumped on this one. I have a many to many self referencing relationship(FluentNH) mapped
I'm stumped. I don't have any errors or even warnings. I set a breakpoint
I'm a little stumped on this one. Anyone have any ideas? I'll try to
Recently stumped upon this line in a program, and I have no idea what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.