I'm no Ajax expert, but that sounds about right!
Jeremy Burns
jeremybu...@me.com
On 27 Mar 2010, at 06:22, Ed Propsner wrote:
> I think part of the problem here is that $ajax->observeField is only is only
> focusing on a single form field and that is the element being passed to the
> controlle
I think part of the problem here is that $ajax->observeField is only is only
focusing on a single form field and that is the element being passed to the
controller. I just assumed Any/all of my form data was accessible in any one
of the controllers.
On Sat, Mar 27, 2010 at 1:48 AM, Ed Propsner
Sorry, I'm new to Cake and was a bit confused. I was echoing the debug
inside the controller that the ajax call uses. The only two fields that are
being used in that controller are 'password' and 'confirm_password' ... only
'confirm_password' is displayed with the debug.
Up until now I never thoug
You say they are being recognised OK, but they weren't in the $this->data array?
Have you checked the actual page source to examine the form in the view? Only
yesterday I debugged a similar problem where the browser was ending the form
for me (I had embedded it incorrectly into a table).
Jeremy
Use $form->input() instead of $form->radio() or use $form->error()
together with $form->radio()
On Mar 27, 1:05 am, aapljack wrote:
> I am building a form with a set of radio buttons and am failing to get
> any kind of error message when they don't pass the validation.
>
> Here is the model code
Yup, I double checked to make sure I didn't somehow inadvertently end the
form early but it's all good. The field before 'password' is 'username' and
i'm using $ajax->observeField to display changes to the 'username' field but
it's not doing anything and I'm guessing that it's' not seeing the field
But are they inside the form in the view?
Jeremy Burns
jeremybu...@me.com
On 27 Mar 2010, at 05:15, Ed Propsner wrote:
> Yes, I'm expecting to see $this->data['User'][''password'] as well. Both
> fields exist and are displayed in the view.
>
> On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns wr
Yes, I'm expecting to see $this->data['User'][''password'] as well. Both
fields exist and are displayed in the view.
On Sat, Mar 27, 2010 at 1:09 AM, Jeremy Burns wrote:
> So all you can get is $this->data['User']['confirm_password']...
>
> Are you expecting more fields to be in the array? Are t
|Your question is not clear, I guess you need this:
$this->Model1->Behaviors->attach('Containable');
|
$this->Model1->find('first',
array(
'conditions' => array('Model1.id' => $id),
'contain' => array('Model2' => array('fields' =>
array('Model2.title
So all you can get is $this->data['User']['confirm_password']...
Are you expecting more fields to be in the array? Are the fields you want
inside the form in the view?
Jeremy Burns
jeremybu...@me.com
On 27 Mar 2010, at 05:00, Ed Propsner wrote:
> The only thing showing in the array is the fie
The only thing showing in the array is the field for 'confirm_password',
[code]
Array
(
[User] => Array
(
[confirm_password] => test
)
)
[/code]
I'm having the same issue with the the username field. It's acting
like the field doesn't exist.
On Sat, Mar 27, 20
The reason I recommended that you examine the data array is that sometimes (and
I often get confused with this myself) you need to double check exactly where
the item you are looking for sits in the array. So if you can see the field you
want, build the path to it by walking back up from it. If
Hi Forum
I've a problem with my cake application.
i've 2 tables (sites and articles). The relations in the model:
sites belong to sites (self join)
sites has many sites
sites has many article
articles belongs to sites
I added the translation behavior to my model and put the db-fields in
the sett
Maybe your database table engine does not support transactions.
What engine are you using?
Lucca Mordente
On 26 mar, 09:28, Ernesto wrote:
> Hello.
>
> i have 2 models (Item and Order) joined together by a HABTM
> relationship.
> since i need some additional fields (quantity) in the join table i
I am trying to figure out how to use containable properly.
These are the model relationship:
Client has many Account
Account has many Bills
Bills have many BillResources
ResourceType hasMany BillResource
BillResources belong to bill
Bills belong to Account
Account belongs to Client
I am trying t
I'm not sure why but I'm relatively sure that it's not recognizing the form
fields for username and password.
On Fri, Mar 26, 2010 at 10:38 PM, Ed Propsner wrote:
> Yes, I did try that. There is a field for confirm password as well and that
> is all that is being presented to the controller.
>
>
Yes, I did try that. There is a field for confirm password as well and that
is all that is being presented to the controller.
On Fri, Mar 26, 2010 at 1:29 AM, Jeremy Burns wrote:
> Have you debugged the data that is being presented to the controller
> function? Set debug to 2 and type die(debug(
I have this for my find all ;
$count = 10;
$params = array(
'conditions' => array(
'Entry.featured' => 1),
'fields' => array(
'Entry.id',
'Entry.title'),
'limit' => $count,
'order' => 'rand()',
'contain' => false);
return $this->find('all', $params);
So I have 100 du
I have to go to bed good night
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 cake-php@googlegroups.c
I want the title description and in the first version
reservation_status
i try it over contains or recursive 2 But no change
On 27 Mrz., 00:39, cricket wrote:
> Which fields from Model2 do you want? Do you want anything from
> Model2?
>
> On Mar 26, 4:57 pm, amarradi wrote:
>
> > The Question
Hello together,
i have two models, hasOne(Model2) hasMany(Model1) connection
now i try to search over an id in model1 the data in model2.
i try it in this way
$this->set('var1',$this->Model1->find('first', array(
'conditions' => array('Model1.id' => $id),
'recurs
Which fields from Model2 do you want? Do you want anything from
Model2?
On Mar 26, 4:57 pm, amarradi wrote:
> The Question is how do i get the information from an/the associated
> model
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questio
I didn't, but I just realised the problem. In AppController, I had
$this->authorize = 'controller' instead of $this->Auth->authorize =
'controller'. It works fine now.
Thanks for responding, though.
On Mar 26, 4:45 pm, nurvzy wrote:
> isAuthorized() is only called if the action is not already al
Thanks again, Pablo. That worked.
For a brief moment, it displays my response message, and then reloads
the page. I suspect maybe I need to tweak the jQuery to get that to go
faster. I'm using ajaxForm from the jQuery form library.
Check out the new CakePHP Questions site http://cakeqs.org and he
The Question is how do i get the information from an/the associated
model
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 g
Thanks for the tip but i get this sql error
Unknown column Model2.id' in 'field list'
Because there is an array in Model2.
[0]
[1]
I dont know how do i get an coorect dataset
On 26 Mrz., 21:31, Martin Radosta wrote:
> try
> 'recursive' => -1
>
> On 03/26/2010 05:23 PM, amarradi wrote:
>
isAuthorized() is only called if the action is not already allowed
$this->Auth->allow('action_name'). In the controller you want to lock
down do you have something along the lines of $this->Auth->allow('*')
in your beforeFilter?
Hope that helps,
Nick
On Mar 26, 1:45 pm, cricket wrote:
> In App
try
'recursive' => -1
On 03/26/2010 05:23 PM, amarradi wrote:
I have to correct it because in the that have to be an other value
$this->set('variable', $this->Model1->find('first',array(
'conditions' => array('Model1.id' => $id),
'recursive' =>
Why are you using ?var1=$hiddenFieldId? Why not just use:
'url' => '/purchases/addGuestToTable/'.
$hiddenFieldId.'/'.draggedid.element.id
Then in your purchases controller:
function addGuestToTable($hiddenFieldId, $draggedId){
//Do what you want.
}
Hope that helps,
Nick
On Mar 26, 5:08 am,
I have to correct it because in the that have to be an other value
> $this->set('variable', $this->Model1->find('first',array(
> 'conditions' => array('Model1.id' => $id),
> 'recursive' => 1,
> 'fields' =>
> array('Model1.id','Model1.title','Model1.
Hello together
Array
(
[Model1] => Array
(
[id] => 1
[title] =>titletext
[description] => description
)
[Model2] => Array
(
[0] => Array
(
[id] => 2
[model1_id]
In AppController, I have:
$this->authorize = 'controller';
I have several types of Users, each with a 'model' field set. I'd like
to bar certain types of Users from accessing the forum. In
ForumSectionsController, I have:
function isAuthorized()
{
return $this->Auth->user('admin') || $this->
It's a little difficult to wrap my head around, but I think I see
what's going on.
belongsTo is a many to one relation, so many PracticeInstance belong
to 1 PracticeItem
That defies my intuition, because it's more natural for me to think of
a PracticeItem as belonging to a PracticeSession. The Pr
Once again, silly me.
The several value are setting each time the value for the radio.
So when the first one is created, value = 'always' and it is checked.
When Cake parses the second input and creates it, it sets the value to
'exact', and the second one is checked.
So I was finding always the la
Hello Johnny,
class PracticeItem extends AppModel {
}
class PracticeInstance extends AppModel {
var $belongsTo = 'PracticeItem';
}
class PracticeSession extends AppModel {
var $hasMany = 'PracticeInstance';
}
tblPracticeInstances
* id
* practiceitem_id
* practicesession_id
*
tblPract
I am building a form with a set of radio buttons and am failing to get
any kind of error message when they don't pass the validation.
Here is the model code I have for validation..
var $validate = array(
'name' => array(
'rule' => 'notEmpty',
Hello everybody,
In the app I am building I have these three radios:
echo $form->input('RuleRecurrence.weekdayconditions', array(
'type' => 'radio',
'options' => array('always' => 'Sempre'),
'checked' => ($WeekdayCondition == 'always' ? true
On Mar 26, 4:51 am, sebb86 wrote:
> in addition: in my view i retrieve this data in a foreach loop with
> this code:
> [view code]
> NULL) { ?> port id "; echo $port['Port']['uplink_id'];
> echo " (-> number: "; echo $port['ParentPort']['HardwareUnit']
> ['schenker_number']; echo ")"; } ?>
Grea
Looking here:
http://book.cakephp.org/view/78/Associations-Linking-Models-Together
I'm certain my issue is due to a personal lack of understanding.
I'm trying to homebrew a simple app to keep track of my guitar
practice.
I have the following models:
PracticeItem: a specific exercise to be practi
Hi again.
I've found a solution to my problem.
I ended up creating the input-radios one at the time, and inserting
the html I need between them.
What I was actually mistaking was not setting the
attributes['value'].
echo $form-
>input('RuleRecurrence.weekd
Check validation errors. If "ItemsOrders" items are validated after
"Order" and fail transaction should be rolled back. Data stays added
as you have non-InnoDB table "orders" that do not support
transactions.
On Mar 26, 6:28 pm, Ernesto wrote:
> Hello.
>
> i have 2 models (Item and Order) joined
Hello everybody.
I need to create few radio options, each one separated by different
portions of html code.
E.g.:
Mr
...something...
Mrs
some other html
Ms
...something else...
etc.
I know that I might use the options['separator'] if the html code
between the radios was the same. But that'
Thanks Jeremy
Turns out all I needed to do was modify the main .htaccess. I had done
this previously but had errors and wasn't aware of the errors. Fixed
the errors and it is working.
On Mar 25, 10:33 pm, Jeremy Burns wrote:
> Try installing it in /app/webroot/xxx, where xxx is a folder that yo
Thank you, Pablo. I'll give that a try.
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 cake-php@googl
There's no way to controller the reload of the current page or a only a part
from the controller. You should send an special reponse to the javascript
(ie:a simple "reload" string could work), and at the client side do
something like document.location="youurl"
Regards,
Pablo Viojo
pvi...@gmail.co
I'm using AJAX to update part of a page. On occasion, however, the
user may make a change that necessitates reloading the entire page,
not just the elements that are used with the AJAX call.
If I do a redirect in the controller, it reloads the entire page into
the ajax element. Is there a way in t
Found a shell-based way to automatically answer the question.
http://www.unix.com/shell-programming-scripting/30246-how-give-variable-command-shell-script.html
On Mar 26, 3:41 pm, Martin Westin wrote:
> I am almost there with the Schema Shell. Now just one thing remains.
> Being able to do "r
I am almost there with the Schema Shell. Now just one thing remains.
Being able to do "run update -f" without answering y or n to the
questions.
Is there a non-interactive mode for the Schema Shell? I can't see any
option to do it.
/Martin
Check out the new CakePHP Questions site http://cakeqs.o
I'll update the thread with some findings after rooting through the
code a bit.
Looking at the source I found out that -f does not "force 'generate'
to create a new schema.". It is used "To force generation of all
tables into the schema..." but not only that.
It can also be used to force update t
I have found this book to be by far the best. It covers all of the bases and
does what it says on the tin.
Second place goes to "Practical CakePHP Projects".
But you're right - CakePHP books are thin on the ground.
Jeremy Burns
jeremybu...@me.com
On 26 Mar 2010, at 11:44, Alper K. Tunç wrote:
Hi euromark,
I have tried now FALSE as well but it does the same... those quotes
still brakes the html..
Thanks
Tomas
On 25 bře, 13:13, euromark wrote:
> escape should not be true but FALSE in this case
>
> On 25 Mrz., 08:41, "toka...@gmail.com" wrote:
>
> > Hi,
> > How can I escape double qu
Hello.
i have 2 models (Item and Order) joined together by a HABTM
relationship.
since i need some additional fields (quantity) in the join table i
splitted the HABTM in 2x hasMany.
after that i coded a Order add form wich gives me this data array
Array
(
[Order] => Array
(
Hi Jeremy,
What about the Beginning CakePHP: From Novice to Professional book by David
Golding?
Did you have any chance to review it?
Alper
On Fri, Mar 26, 2010 at 1:35 PM, Alper K. Tunç wrote:
> Thank you again Jeremy for the warning.
> There are not many books available about CakePHP and I bor
Thank you again Jeremy for the warning.
There are not many books available about CakePHP and I borrowed this one
from a friend.
I guess I'll stick with the online examples.
Alper
On Fri, Mar 26, 2010 at 12:07 PM, Jeremy Burns wrote:
> Something looks wrong with your implementation; I'd expect to
Hi all, I've searched the google group and unfortunately cant find any
info on this (or anywhere for that matter)..
I'm trying to send PHP variables over an ajax dropRemote request but
the action thats meant to be recieving the parameters is not picking
it up.
Basically I am trying to drag people
Something looks wrong with your implementation; I'd expect to see
http://localhost/quickwall/questions/show/1 (assuming you've set this up in the
quickwall folder).
It's a personal thing, but I'm not a fan of that book. Some of the code samples
are wrong and it doesn't stick to conventions (sho
Hi all,
I'm going over the QuickWall example in CakePHP Application
Development book by Ahsanul Bari and Anupom Syam.
In the example, there is a line where the questions are produced:
link($question['Question']['question'].'?',
array('action' => 'show', $question['Question']['id']))); ?>
The stra
Thank you Jeremy.
I'll go through the reference links you provided.
I like the philosophy of CakePHP more and more as I explore it. I'll
send you a link for my question once I develop the page.
Regards,
Alper
On Mar 26, 7:22 am, Jeremy Burns wrote:
> I'd recommend that you read the section of the
in addition: in my view i retrieve this data in a foreach loop with
this code:
[view code]
port id "; echo $port['Port']['uplink_id'];
echo " (-> number: "; echo $port['ParentPort']['HardwareUnit']
['schenker_number']; echo ")"; } ?>
Check out the new CakePHP Questions site http://cakeqs.org and
Jeremy
It works with a little modification :) great!!!
The modification is to change "ChildPort" to "ParentPort" in the
following code:
[code]
var $paginate = array(
'fields' => array('*'),
'recursive' => 2,
'limit' => 50,
'order
Does anyone have an example of how to create an Ajax form from start
to end using the Js helper in 1.3? Which components/helpers to
include, how to set up the view and the controller, how to get the
right layout etc? The information is all out there somewhere, but in
bits. I'd love to see a simple
By default a find with recursive will only fetch the data from the
model and it's directly associated models. Therefore when running
User->find() you will get User and Project but not Library as library
has no direct link to User.
To include the extra level of associations increase User->recursiv
The problem is (I think) that you are creating a self join but calling the
joined model 'Port', which is the name of the current model.
Try changing to this (I've used ParentPort and ChildPort but you can rename at
will):
> public $belongsTo = array(
>'HardwareUnit' => array(
>'
63 matches
Mail list logo