School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,404 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,624 people online right now. Registration is fast and FREE... Join Now!




how to remove warning

 

how to remove warning, Cake php customization

jana.supriyo

6 Jun, 2009 - 12:19 AM
Post #1

New D.I.C Head
*

Joined: 19 Dec, 2008
Posts: 10

CODE

<?php echo $html->formTag('/users/register') ?>
<p>Please fill out the form below to register an account.</p>
<label>Username:</label>
<?php echo $html->inputTag('User/username', array('size' => '40')) ?>
<?php echo $html->tagErrorMsg('User/username', 'username is required') ?>
<label>Password:</label>
<?php echo $html->passwordTag('User/password', array('size' => '40')) ?>
<?php echo $html->tagErrorMsg('User/password', 'password is required') ?>
<label>Email Address:</label>
<?php echo $html->inputTag('User/email', array('size' =>
'40','maxlength'=>'255')) ?>
<?php echo $html->tagErrorMsg('User/email', 'email is invalid') ?>
<label>First Name:</label>
<?php echo $html->inputTag('User/first_name', array('size' => '40')) ?>
<?php echo $html->tagErrorMsg('User/first_name', 'first_name is required') ?>
<label>Last Name:</label>
<?php echo $html->inputTag('User/last_name', array('size' => '40')) ?>
<?php echo $html->tagErrorMsg('User/last_name', 'last_name is required') ?>
<?php echo $html->submitTag('register') ?>
</form>



When run that cake php code it will show the following warning

Warning (512): Method HtmlHelper::formTag does not exist [CORE\cake\libs\view\helper.php, line 143]



User is offlineProfile CardPM
+Quote Post


RudiVisser

RE: How To Remove Warning

6 Jun, 2009 - 01:53 AM
Post #2

.. does not guess solutions
Group Icon

Joined: 5 Jun, 2009
Posts: 1,872



Thanked: 137 times
Dream Kudos: 125
Expert In: PHP, MySQL, HTML, CSS, C#

My Contributions
Well... Method HtmlHelper::formTag doesn't exist...
User is offlineProfile CardPM
+Quote Post

noorahmad

RE: How To Remove Warning

6 Jun, 2009 - 02:24 AM
Post #3

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
can you past your all code
User is online!Profile CardPM
+Quote Post

AdaHacker

RE: How To Remove Warning

13 Jun, 2009 - 10:46 AM
Post #4

D.I.C Regular
***

Joined: 17 Jun, 2008
Posts: 378



Thanked: 83 times
My Contributions
When all else fails, paste your error message into Google and you'll probably find an answer.

Short version: formTag() is an old function that was removed in Cake 1.2. You need to use the FormHelper instead of the HtmlHelper.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 10:33PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month