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 8504387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:01:00+00:00 2026-06-11T02:01:00+00:00

So, in CakePHP, there is a way to turn off labels by default by

  • 0

So, in CakePHP, there is a way to turn off labels by default by putting 'label'=>false in ‘inputDefaults’ in the Form->create() statement.

Is there a way to, instead of removing labels altogether, to change labels into element placeholder attributes? This is equivalent to doing the 'inputDefaults'=>array('label'=>false) on the Form->create while adding a 'placeholder'=>'Placeholder' to each element… but is there a way to do it without having to add it to each element and have CakePHP do it for you?

  • 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-06-11T02:01:01+00:00Added an answer on June 11, 2026 at 2:01 am

    You could run your own copy of FormHelper that contains your modifications. You can copy the version of FormHelper from lib/Cake/View/Helper/FormHelper.php and paste it into your app at app/View/Helper/FormHelper.php and make the required modifications to your copy. The copy in your app folder takes precedence over the one provided in the core. As always, never ever ever make modifications to files in Core.

    Alternatively, you could extend FormHelper into your own Helper class:

    class MyFormHelper extends FormHelper {
        ...
    }
    

    Don’t forget to add ‘MyForm’ into your $helpers array!

    At any rate, what you’re asking is not currently possible using Cake 2.x. Without any changes, you’ll need to add a ‘placeholder’ => ‘…’ in the options array of each input() call. If you make this change, please consider contributing it back to the CakePHP community so others can benefit from your work!

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

Sidebar

Related Questions

Is there a way to modify CakePHP's default layout without needing to make my
Is there any way to change the placement of form validation messages in CakePHP?
Is there a way to check CakePHP's model relationships? One model is saving twice
Is there a way to stop cakephp ajax submit to stop the submission in
Is there a CakePhp way to disable direct access to directories to visitors? I
I use Notepad++ and Aptana for editing my CakePHP code? Is there any way
Is there a way to do a find() in CakePHP that converts to an
Is there an easy way in cakephp to get an array of tables schema
Is there a way to configure CakePHP for it to work well with Twitter
Is there a way in CakePHP 1.3 to define a model association without having

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.