Please help me, I am a beginner.
I am using the form helper to create a form like this:
echo $form->create('Category');
echo $form->input('name');
echo $form->input('description', array('rows' => '3'));
echo $form->end('Save Category');
This works fine, but there are 2 parts of the html which bother me:
<input type="hidden" name="_method" value="POST" />
<form id="CategoryAddForm" method="post" action="/admin/categories/
add">
<label for="CategoryName">Name</label>
<input name="data[Category][name]" type="text" maxlength="30"
value="" id="CategoryName" />
<div class="input text required"></div>
<label for="CategoryDescription">Description</label>
<textarea name="data[Category][description]" cols="30" rows="3"
maxlength="128" id="CategoryDescription" ></textarea>
<div class="input text"></div>
<input type="submit" value="Save Category" />
<div class="submit"></div>
</form>
1st Question: What is with the very first input before the opening of
the form? I don't think it is hurting, but why is it there?
2nd question: You can see that the div which is supposed to be
wrapping the input is actually output after the input, and is empty.
eg:
<input type="submit" value="Save Category" /> <div class="submit"></
div>
This is a problem for me because I would like to use this to style the
label and input field. I can't understand what I did wrong. Has this
happened to anyone before? How can I make it wrap the input like this
<div class="submit"><input type="submit" value="Save Category" /></
div>
I checked in /cake/version.txt and it says I am using 1.2.6
Any help would make me very happy. Thanks in advance.
Phil
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en