Yes you can!
In the form field, add the option 'error' = false to disable the
automatic error message. Then use the form helpers error method for
the field and place it whereever you want.
See http://book.cakephp.org/view/721/error
Enjoy,
John
On Jan 5, 9:46 am, Dave make.cake.b...@gmail.com
Thanks John,
I did set the 'error' = false so no message shows. But how do I get the
error class to end up inside the li
I tried an assortment of attemps with
li class=?php echo $form-error('User.password', NULL, array()); ? ???
But nothing.
Ideas?
Thanks,
Dave
-Original Message-
Here you go - this covers the basics. Using the component is actually
quite simple:
http://www.jeremy-burns.co.uk/2009/12/cakephp-sending-email-using-the-email-component/
On Jan 5, 1:47 am, otisjs01 jerem...@jeremiahotis.com wrote:
Hello,
I am new to CakePHP and trying desperately to learn!
Try this,
li ?php if($form-error('User.password')){? class='error''?php }?
/li
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
What you have here looks correct, except that your $belongsTo
definition in your State model looks wrong. Shouldn't that be a
$hasMany definition? That means that an Employee belongs to a State,
and a State has many Employees.
The drop down is displayed in a view and the contents of the drop down
Well, now that I took a better look at your code, I don't understand
why you don't use the standard cake form field and error generation,
because that should be all you need :)
Example HTML from my own code where the field has an error - it is
mandatory:
[code]
print( $form-input(
Hi again,
I am open to learn, so please tell me, whats the benefit of url
obscurity if not protecting against CSRF. A large german social
network uses that to protect against CSRF - though they do not use
UUIDs. Just links like domain.tld/long_random_looking_stuff_here, it
works against mining
This suggestion by Jeremy looks all right:
$states = $this-Employee-State-find('list');
$this-set(compact('states'));
My hint would be to change your database schema to state: id, name or
state: id, title as state: id, state is redundant anyway. The magic
that will appear is cake auto detecting
Hi all,
I have a simple rating controller, so users can rate each other. I
don't know the reason, but every few days the whole ratings table in
the database is empty. All ratings are lost. Here is my ratings
controller as I use it. There are no other methods or anything else. I
exactly use it
Maybe this will help: http://bakery.cakephp.org/articles/view/encrypting-urls
On Jan 1, 11:54 am, anka andreas.katz...@gmail.com wrote:
Hi @all,
I have a (almost) simple question! Is it possible to make all cake php
REST URLs unreadable? What I mean is, that a given REST URL like .../
It's easy, the only thing that you have to do is
$data = $this-State-find('all', array('fields' = 'State.id,
Provincia.state'));
$state_list = Set::combine($data, '{n}.State.id', '{n}.State.state');
$this-set('state_list', $state_list);
With this the select will show the state names and in the
Hi Fred,
From what I understand about XAMPP, the document root is in
/Applications/XAMPP/htdocs, so I would put the CakePHP files in there first
and try accessing it again. Also make sure that the default Apache is not
running or you are serving XAMPP from a different port.
HTH,
Adeola.
Hi Donnerbeil,
The problem is likely down to the fact that you're doing a read of the existing
Rating record expecting that to set the id before the save, but you're then
passing in a full data set (without and id set) to the save method.
Maybe try replacing:
Isn't it open source?
Not the first time someone made a fork of it - including the original
author. :)
On Jan 4, 10:31 pm, Juan Luis Baptiste juan.bapti...@gmail.com
wrote:
On Mon, Jan 4, 2010 at 10:05 AM, hashmich hendrik.schm...@web.de wrote:
Oracle is going to take over Sun Microsystems -
Is it trustworthy? Oracle is not friendly to open source at all. They can
kill MySQL just by delaying to fix bugs. MySQL development is rather open.
It is quite opposite to Oracle style.
I think you are overreacting, have you read Oracle's public position
on this ? I think not:
One more issue that has deflated my initial euphoria...
The results don't paginate. How can I rectify that?
On Jan 2, 4:53 am, Jeremy Burns jeremybu...@me.com wrote:
A success! Using your self created join code I arrived at this:
$results = $this-LocationType-find(
'all',
On Tue, Jan 5, 2010 at 9:15 AM, Dinh pcd...@gmail.com wrote:
Is it trustworthy? Oracle is not friendly to open source at all. They can
kill MySQL just by delaying to fix bugs. MySQL development is rather open.
It is quite opposite to Oracle style.
AFAIK it was one of the conditions imposed by
Also as I said, MySQL isn't competition to
them, both are targeted to different markets.
Five years ago, yes. But now, no. I worked both in finance and telecom
industry and felt MySQL heat. Just take a look at BI, ERP and CRM world, you
will see MySQL there already to some extent.
Do you
Yes you can. Just put all inside your public_html directory (assuming that user
directories are enabled) or a subdirectory of public_html.
It might be that .htaccess files are not handled for user directories. If so,
check the file app/config/core.php and enable rewriting by CakePHP.
On 4 jan
Hello John,
Only because I have my hint class p in there so in my forms there is a
little text beside each field. This is all wrapped inside the li Sure I
can get the input text error to get an error class to hi-light the text
field, but looks rather dumb when the form has :
Form
li class =
Thanks,
This works perfect.
li ?php if($form-error('User.password')){? class='error''?php }?
/li
After re-reading Johns email I think i gave the impression that the hint was
the error message. That is where I may have causeed some confusion. The hint
is always visible, its not an error
Hi Dave,
I did understand that your hint was - a hint to the user - but I
assumed that you would find out how to include that together with the
form field definition :)
Using the form helper, I would just add the after option to include
something after the entry field. Using your hint code, I
CakePHP manual reference is
http://book.cakephp.org/view/191/options-before-options-between-options-separator-a
Enjoy,
John
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
Thanks John,
Good looking out! I will add that since its more cake-ish than my current
setup with the after method.
Thanks again for your time and sorry for the confusion :)
Dave
-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of John
I know this is a really green question, but how does the
'{n}.State.id' section of your code work. I tried to look in my php
manual but was at a loss of where to find information on this data
construct/Placeholder/Whatever{n} is??? I have been at a loss as to
how to navigate the complex arrays
Isn't it nice to have a descent data layer like we do in cake.
Granted it might be a few days work to switch from MySQL to something
like PostgreSQL for a decent sized project.
But you probably have a few years before we ever get to that point
where we are forced to do so.
Don't sweat the small
Thanks for the reply, Kees.
On Jan 5, 4:23 pm, Kees de Bruin halfje.br...@gmail.com wrote:
Yes you can. Just put all inside your public_html directory (assuming that
user directories are enabled) or a subdirectory of public_html.
Ok, that's useful to know. My immediate 'issue' is on
Fred,
As I wrote in my reply you have to make a small change in app/config/core.php
where you have to uncomment line 59 and remove the .htaccess files that are
listed just before that line.
All URLs should now be something like ../cake/index.php/page instead of
../cake/page
Check out the new
Notice: unserialize() [function.unserialize]: Error at offset 6 of
1051 bytes in C:\xampp\htdocs\projects\courses\cake\libs\cache
\file.php on line 189
anyone seen that before? I have 5 similar warnings all because the
same line. I am on a windows machine running xampp.
when i click notice the
San Jose!! it is silicon valley and I don't need to travel hahaha. San
Francisco would work better probably though! :)
On Jan 4, 9:47 am, drpark webmas...@attractionland.com wrote:
Hi all!
Miami, Orlando, Wilmington NC, Las Vegas, Chicago, Seattle for the USA
in order of preference
Cancun for
Sorry, Kees, I saw the second line in your reply but as you preceded
it with It might be that .htaccess files are not handled for user
directories I presumed that it didn't apply in my case,
because .htaccess files plainly are handled in XAMPP. My mistake, and
thanks for the second reply. Ok,
On Tue, Jan 5, 2010 at 5:59 PM, Fred Riley fred.ri...@gmail.com wrote:
(..)
I can't be the first person to have come across this issue. Is there
not a FAQ somewhere?
Just include the directive
RewriteBase /~theusername
at the beginning of your .htaccess files.
Best regards.
--
MARCELO F
Hi,
I create form for example with two fields: Client.name, User.email.
I send this form to Client model and validate 'name' field.
But how I can validate field 'email'?
Thanks!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You
How validate field only we entered some value into input?
For example:
I have form with fields: username, password and email
I set 'value'='' in edit template for password input field
When I edit this fields, I want update filed password only when I
wrote some new password, but when I lost empty
Hi Nancy:
Matt Curry wrote an HTML cacher helper that writes the entire view to
a file and saves it in the webroot. Check out his helper code -- it
seems to be doing exactly what you're after; writing the view to an
HTML file.
http://github.com/mcurry/html_cache
When I was learning php classes we made a model object for each type
of data we had. Each model would have crud from another class and then
model specific functions attributes. For example i would have:
class Person extends Crud {
var $first_name;
var $last_name;
static function
you set the validation rules in the Model of whatever your using (i'm
guessing users model) /app/models/user.php
search for cakephp validation in google and look in the cakephp
manual, it should be what you need.
On Jan 5, 6:53 pm, kicaj ki...@kdev.pl wrote:
How validate field only we entered
37 matches
Mail list logo