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

  • SEARCH
  • Home
  • 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 6218001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:31:26+00:00 2026-05-24T07:31:26+00:00

I have the following code: <h2>Add System</h2> <?php echo $this->Form->create(‘ReleaseServer’); echo $this->Form->input(‘server_name’,array(‘error’=>array( 0 =>

  • 0

I have the following code:

<h2>Add System</h2>
<?php
echo $this->Form->create('ReleaseServer');
echo $this->Form->input('server_name',array('error'=>array(
                           0 => 'Please choose a system name'),
                          'label'=>'System Name'
            ));
echo $this->Form->input('server_id', array('label'=> 'System ID'));
echo $this->Form->select('server_environment', $environments, null, array(
                                'empty' => "-- Select an Environment --",
                                'label' => "Select an Environment",
                                'error' => array(0 => 'Please choose an environment!'),
                                'onchange'=>'console.log(this.value);'
                            )
                        );
echo $this->Form->end('Save System');
?>

For some reason the line
echo $this->Form->input('server_id', array('label'=> 'System ID'));
shows up as a select box no matter where I place it.

How do I resolve this?

  • 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-24T07:31:28+00:00Added an answer on May 24, 2026 at 7:31 am

    You could try adding type to your options array and explicitly defining what you want the input to be.

    Edit

    After digging around in the Cake API I think I may have found a specific line of code that may be affecting you here.

    if (preg_match('/_id$/', $fieldKey) && $options['type'] !== 'hidden') {
        $options['type'] = 'select';
    }
    

    It appears likely that you are triggering this if conditional. If so, your only option is to explicitly set the type attribute in your options array.

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

Sidebar

Related Questions

I have the following code: SPList list = web.Lists[this.ListName]; SPListItem item = list.Items.Add(); now
I have the following bit of code, simply: $(function() { $('a.add-photos-link').live('click', function(e) { $(this).colorbox({
I have the following Javascript code add_num = { f: function(html, num) { alert(this.page);
I have the following code that I need to add an additonal object to
I have written the following code choice /m Do you want to add another
I have the following code: var entityConnection = (System.Data.EntityClient.EntityConnection)c.Connection; DbConnection conn = entityConnection.StoreConnection; ConnectionState
I have the following code var section = new CustomConfigurationSection(); section.SectionInformation.Type = System.Configuration.NameValueFileSectionHandler; section.SectionInformation.SetRawXml(sectionXml);
Currently I have The following code: void Page_Load(object sender, System.EventArgs e) { string connectionString
I have following code : System.out.println( | 1 2 3 4 5 6 7
I have the following IronPython code. class Hello: def __init__(self): pass def add(self, x,

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.