MySQL table fields comments instead of names in CakePHP

On web forms in application created with CakePHP, instead of column names as labels (next to input text fields), I need to display field comments.

Can you tell me which will be best way to accomplish this?

Answers


You can use this code:

echo $this->Form->input('field', array(
    'before' => 'Description of the field',
    'label' => false
));

and it will output:

<div class="input">
Description of the field
<input name="data[Model][field]" type="text" value="" id="ModelField" />
</div>

Need Your Help

Google maps api directions zoom not working

javascript google-maps-api-3

Im using below code to show a distance between two distances but zoom doesn't work it always will be in default zoom level. I tried setting lot of values but it's not working. Please help.

Best Library for Dynamic PDF or Word Doc Generation?

c# .net asp.net pdf ms-word

Our ASP.NET application must be able to export web content to PDF and Word documents.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.