Possible security risk when saving data in forms - adding fields

2008-07-04 Thread phpjoy
When getting a form from a user, it should be double checked in the user's action logic. A user could easily manipulate a form field to submit a new field to the server, like id="4294967294", and stuck the users table. The user could guess, of course, other field names, or see ot

Re: Editing model's primary key in forms

2008-07-01 Thread Jonathan Snook
Yes, that's correct. It now uses a period instead of a slash. On Tue, Jul 1, 2008 at 1:50 PM, Bryan D <[EMAIL PROTECTED]> wrote: > > Thanks guys, that works perfectly. I take it the Player.id form is > now preferred over Player/id ? I ported my app from Cake 1.1 to 1.2, > and probably missed a f

Re: Editing model's primary key in forms

2008-07-01 Thread Bryan D
Thanks guys, that works perfectly. I take it the Player.id form is now preferred over Player/id ? I ported my app from Cake 1.1 to 1.2, and probably missed a few things. On Jun 30, 4:41 am, "Jonathan Snook" <[EMAIL PROTECTED]> wrote: > On Sun, Jun 29, 2008 at 6:19 AM, Mr. Matt <[EMAIL PROTECTED]

Re: Editing model's primary key in forms

2008-06-30 Thread Jonathan Snook
On Sun, Jun 29, 2008 at 6:19 AM, Mr. Matt <[EMAIL PROTECTED]> wrote: > > I believe this should work: > > input('Player/id', array('type' => 'text')); ?> Just to clarify, it's Player.id (notice the . instead of the /) --~--~-~--~~~---~--~~ You received this message

Re: Editing model's primary key in forms

2008-06-30 Thread Mr. Matt
I believe this should work: input('Player/id', array('type' => 'text')); ?> On Jun 27, 5:54 pm, Bryan D <[EMAIL PROTECTED]> wrote: > I would like to allow a model's primary key field (named id) to be > editable, at least upon creation of a new object. I noticed that using > syntax like: >  input

Editing model's primary key in forms

2008-06-28 Thread Bryan D
I would like to allow a model's primary key field (named id) to be editable, at least upon creation of a new object. I noticed that using syntax like: input('Player/id') ?> doesn't work because CakePHP converts it to a hidden field automatically. Is there some way I can override this? I worked

Re: Form validation - multiple forms and multiple tables used per model

2008-06-17 Thread koala kid
OK, I think I worked out what to name the file and where to save it: app/models/behaviours/multi_validate.php. However I can't get it to work. The form submits without validating. I first set my validation rules in the model eg: var $actsAs = array('MultiValidatable'); /**

Re: Form validation - multiple forms and multiple tables used per model

2008-06-17 Thread koala kid
Ok, I dug around and found out what to name the file and where to save it, I think. I saved the file as multi_validate.php in app/models/ behaviours/. Is this correct? I then defined my rules eg: var $validationSets = array( 'admin' => array(

Re: Form validation - multiple forms and multiple tables used per model

2008-06-17 Thread koala kid
Hi, thanks for your help, its really appreciated. I'm new to cake and although I know its going to be beneficial in the long run right now the learning curve sucks and what really makes it worse is the lack of decent documentation. For example the behaviour you gave me the link to seems to do ex

Re: Form validation - multiple forms and multiple tables used per model

2008-06-17 Thread keymaster
> How do I run cake's validation methods on each form separately. At the > moment you appear to define your rules in $validate outside of any > functions/methods. How do I run it from within a method. Use this behavior: http://bakery.cakephp.org/articles/view/using-many-validation-rulesets-per-m

Re: Form validation - multiple forms and multiple tables used per model

2008-06-17 Thread Marcelius
ented btw :-) http://manual.cakephp.org/view/125/data-validation http://api.cakephp.org/class_model.html On 16 jun, 23:42, koala kid <[EMAIL PROTECTED]> wrote: > Hi, > > I am using one model to process and save the data for multiple forms. > How do I run cake's validation met

Form validation - multiple forms and multiple tables used per model

2008-06-16 Thread koala kid
Hi, I am using one model to process and save the data for multiple forms. How do I run cake's validation methods on each form separately. At the moment you appear to define your rules in $validate outside of any functions/methods. How do I run it from within a method. In addition as my

Re: Formatting Forms

2008-05-03 Thread [EMAIL PROTECTED]
I think you are over generalizing the standard (recommended by w3c) that tables shouldn't be used for web page layouts. It's fine to use tables to format data and forms, it's also just as fine not to use tables for format forms. Don't feel bad about using tables to format

Re: Formatting Forms

2008-05-02 Thread annie.r.knight
;)), > > > 'bacon' => array_merge($defaults, array('type' => 'text', 'value' => > > > 'ing')) > > > ); > > > echo ''; > > > echo $form->inputs($inputs); > > > echo 

Re: Formatting Forms

2008-05-02 Thread annie.r.knight
27;text', 'value' => > > 'test')), > > 'bacon' => array_merge($defaults, array('type' => 'text', 'value' => > > 'ing')) > > ); > > echo ''; > > echo $form

Re: Formatting Forms

2008-05-02 Thread annie.r.knight
gt; 'bacon' => array_merge($defaults, array('type' => 'text', 'value' => > 'ing')) > ); > echo ''; > echo $form->inputs($inputs); > echo ''; > > [I've posted a ticket to integrate a

Re: Formatting Forms

2008-05-02 Thread grigri
uts($inputs); echo ''; [I've posted a ticket to integrate a 'defaults' key into FormHelper::inputs() to avoid the array_merge thingy, for the future!] On May 2, 2:43 pm, "annie.r.knight" <[EMAIL PROTECTED]> wrote: > Hi all. > > I have an app

Formatting Forms

2008-05-02 Thread annie.r.knight
Hi all. I have an app with a number of long forms in. These forms are formatted in tables with each row looking something like: Input LabelText Box [Or Whatever]. While the long term solution clearly is to migrate this to CSS design I'm going for the quick (and dirty) solution for now using

Re: Forms that add/edit Multiple Models part II

2008-04-24 Thread Jee
Sorry about that. I am never sure how much to include! Following is the action the form posts to. I have validation rules in both the Agency model and the Member model. But the validation errors from the member model don't show up on a failure. Only the agency errors show and not all of those.

Re: Creating forms

2008-04-24 Thread rtanz
right i think i get it thanks alot, ill try it out and see how it goes On Apr 24, 10:20 am, Fran Iglesias <[EMAIL PROTECTED]> wrote: > El 24/04/2008, a las 10:05, rtanz escribió: > > > my problem is how to > > have cake then create the forms themselves based on the desig

Re: Creating forms

2008-04-24 Thread Fran Iglesias
El 24/04/2008, a las 10:05, rtanz escribió: > my problem is how to > have cake then create the forms themselves based on the designer's > selection. any hints? thanks You could create fields in the "Question" model to store the type and options for response. The

Creating forms

2008-04-24 Thread rtanz
forms for questionnaire creation and then the user selects which one he wants from those, my problem is how to have cake then create the forms themselves based on the designer's selection. any hints? thanks --~--~-~--~~~---~--~~ You received this message because yo

Re: Forms that add/edit Multiple Models part II

2008-04-23 Thread Dr. Tarique Sani
On Thu, Apr 24, 2008 at 2:05 AM, Jee <[EMAIL PROTECTED]> wrote: > > Can anyone give me any suggestions for adding and editing multiple > models from one form in Cake 1.2? A call to saveAll should suffice but it would also help if you showed some code that you are using Tarique -- ==

Forms that add/edit Multiple Models part II

2008-04-23 Thread Jee
Can anyone give me any suggestions for adding and editing multiple models from one form in Cake 1.2? I found a post on the topic here: http://groups.google.com/group/cake-php/browse_thread/thread/77183ca04771e348 but I get the following when I attempted it: ===

Forms CakePHP v1.1 to CakePHP v1.2 Beta

2008-04-18 Thread Andrew Assarattanakul
Something that I ran across from updating CakePHP v1.1 to CakePHP v1.2 Beta for forms is that quite a few things changed and I wanted to continue to show all of the fields the database has as they are added without having to modify my views or controllers. For the View: - Form::generateFields

Forms CakePHP v1.1 to CakePHP v1.2 Beta

2008-04-18 Thread Andrew Assarattanakul
Something that I ran across from updating CakePHP v1.1 to CakePHP v1.2 Beta for forms is that quite a few things changed and I wanted to continue to show all of the fields the database has as they are added without having to modify my views or controllers. For the View: - Form::generateFields

Re: model validation - how do you handle different rules for different forms?

2008-04-15 Thread R. Rajesh Jeba Anbiah
fields > which have different validation requirements for different forms? The model based validation is a huge pain. FWIW, grigri gave me this for user level based validations http://groups.google.com/group/cake-php/msg/88652124169dd408 -- Email: rrjanbiah-at-Y!comBlog:

Re: Submit "multipart/form-data" forms with CakePHP / Ajax

2008-04-14 Thread Pierre MARCOURT
Thanks Adam. You are right, there is no way to make it work without using iFrame or SWFUpload. I have chosen the first option and now it is working well. To make it work, I used this tutorial : http://elmicoxcodes.blogspot.com/2007/03/asynchronous-upload-like-ajax-1.html Adam Royle a écrit : >

Re: model validation - how do you handle different rules for different forms?

2008-04-14 Thread Dardo Sordi Bogado
How about this? AppModel: function setValidation($validation) { $this->__restoreValidation = $this->validate; if (isArray($validation)) { $this->validate = $validation; } else { $validation = 'validate_' . $validation; $this->validate = $this->$validation; } } function restoreVa

Re: Submit "multipart/form-data" forms with CakePHP / Ajax

2008-04-14 Thread Adam Royle
My point was that Ajax doesn't let you use multipart/data. You'll need to either use something like swfupload or post to an iframe, etc. http://www.railsforum.com/viewtopic.php?id=11430 On Apr 14, 11:29 pm, Pierre MARCOURT <[EMAIL PROTECTED]> wrote: > Yes Chris, I am using CakePHP 1.1.19.6305 so

Re: Submit “multipart/form-data” forms with CakePHP / Ajax

2008-04-14 Thread Pierre MARCOURT
Yes Chris, I am using CakePHP 1.1.19.6305 so it does not work... Thank you for the link Adam but it is not the solution I was looking for. I don't want that the user has to change a setting in his browser. It is not going to be easy to use... I am using Ajax to have a tool "user friendly", so I d

Re: model validation - how do you handle different rules for different forms?

2008-04-14 Thread Flipflops
Hi That's a really good idea - you also wouldn't have to worry about using the wrong validation array by mistake - which I have done - and it took me an age before I figured out what the problem was. Cheers On Apr 14, 10:16 am, keymaster <[EMAIL PROTECTED]> wrote: > oops, that should read: > >

Re: model validation - how do you handle different rules for different forms?

2008-04-14 Thread keymaster
oops, that should read: function beforeValidate(){ // assume $action is set to current action. if (isset($this->validateArray[$action])) { // reassign the $validate variable. $this->validate = $this->validateArray[$action]; } } The beforeValidate() can be pu

Re: model validation - how do you handle different rules for different forms?

2008-04-14 Thread keymaster
Beautiful. The only disadvantage I see is somewhat semantic. The controller shouldn't be telling the model which validation array to use. I wonder if this could be improved by having the model transparently perform the $validate re-assignment in beforeValidate(), using the current action as the

Re: model validation - how do you handle different rules for different forms?

2008-04-14 Thread Flipflops
This is the way I do it (haven't tried it in 1.2 - but I see no reason why it wouldn't work). I've been using this in loads of 1.1.x based sites together Evan Sagge's excellent validation code http://bakery.cakephp.org/articles/view/more-improved-advanced-validation In your model define a numbe

Re: model validation - how do you handle different rules for different forms?

2008-04-14 Thread keymaster
sword change. All these forms: registration, updateProfile, login, changePassword, forgotPassword are validated against the user model. But the validation rules have to be different for each form. Perhaps a stronger example is the password: it is mandatory on the registration form, the login form

Re: model validation - how do you handle different rules for different forms?

2008-04-13 Thread Joel
> workaround) is there a more "core" approach to dealing with fields > which have different validation requirements for different forms? > > The classic example is the login form vs. the registration form, both > of whose fields are validated against the user model. > > B

model validation - how do you handle different rules for different forms?

2008-04-13 Thread keymaster
Other than the conditional validation solution in the bakery, (which seems to work, but is not necessarily a first choice, it's more of a workaround) is there a more "core" approach to dealing with fields which have different validation requirements for different forms? The cla

Re: Submit “multipart/form-data” forms with CakePHP / Ajax

2008-04-11 Thread Chris Hartjes
On Fri, Apr 11, 2008 at 4:40 PM, Pierre MARCOURT <[EMAIL PROTECTED]> wrote: > > Thanks Chris, > > but when I try to use the create method, I have the Fatal error : > Call to undefined method FormHelper::create() That link was for CakePHP 1.2. -- Chris Hartjes Internet Loudmouth Motto for 20

Re: Submit "multipart/form-data" forms with CakePHP / Ajax

2008-04-11 Thread Adam Royle
http://www.captain.at/ajax-file-upload.php On Apr 12, 5:40 am, Pierre MARCOURT <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to submit "multipart/form-data" forms with CakePHP / Ajax ? > I can't manage uploading files this way... > It seems tha

Re: Submit “multipart/form-data” forms with CakePHP / Ajax

2008-04-11 Thread Pierre MARCOURT
es not work... I can't upload the file, I get Notices : /Uninitialized string offset: 0 / Chris Hartjes a écrit : > On Fri, Apr 11, 2008 at 3:40 PM, Pierre MARCOURT > <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Is there a way to submit "multipart/form-d

Re: Submit “multipart/form-data” forms with CakePHP / Ajax

2008-04-11 Thread Chris Hartjes
On Fri, Apr 11, 2008 at 3:40 PM, Pierre MARCOURT <[EMAIL PROTECTED]> wrote: > > Hi, > > Is there a way to submit "multipart/form-data" forms with CakePHP / Ajax ? > I can't manage uploading files this way... > It seems that it is not possible due to secu

Submit “multipart/form-data” forms with CakePHP / Ajax

2008-04-11 Thread Pierre MARCOURT
Hi, Is there a way to submit “multipart/form-data” forms with CakePHP / Ajax ? I can’t manage uploading files this way… It seems that it is not possible due to security restrictions in the browser, is it ? Does someone know a way to manage it (without using IFrames or similar) ? Thanks

Re: how can i create forms on the fly using ajax without requiring a div container to be previously created?

2008-03-29 Thread Zoltan
gh your JS framework. To catch the > ajax response and do an Append to the DOM element instead of a the Replace. > > Doesn't help much, I'm sorry. > > On Fri, Mar 28, 2008 at 2:33 PM, miuuzn <[EMAIL PROTECTED]> wrote: > > > i've been looking for a way to make a

Re: how can i create forms on the fly using ajax without requiring a div container to be previously created?

2008-03-28 Thread Baz
much, I'm sorry. On Fri, Mar 28, 2008 at 2:33 PM, miuuzn <[EMAIL PROTECTED]> wrote: > > i've been looking for a way to make a variable number of forms and > manage them(add or remove) on the client using 2 buttons > > i found the way to update div, but it does n

how can i create forms on the fly using ajax without requiring a div container to be previously created?

2008-03-28 Thread miuuzn
i've been looking for a way to make a variable number of forms and manage them(add or remove) on the client using 2 buttons i found the way to update div, but it does not fit my requirement... as if i update the whole div i would have to recreate all the forms. And i can't have a di

Login Redirected differently if coming from different forms

2008-03-05 Thread Valentin Ceaprazaru
Hola I have a question about a login action. If i use the default form on the login page everything works fine and the users are directed to their home pages. But if i use another form, that i have on another page (that has the same input names) i get redirected to the regular login form. The stu

So How do we handle multi-record/model forms?

2008-02-08 Thread Skyblaze
This is a recurrent topic and there aren't full valid solutions/ tutorials to the problem right now with cake. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to ca

Re: Confused using forms (i think!)

2008-01-23 Thread judouk
Thanks all. I did more googling and ended up replacing the generateList() stuff with $l = $this->User->Usertype->find('all', array('fields' => array('Usertype.id', 'Usertype.choice'))); $result = Set::combine($l, "{n}.Usertype.id", "{n}.Usertype.choice"); $this->set('usert

Re: Confused using forms (i think!)

2008-01-21 Thread grigri
$html->selectTag() and friends are deprecated in 1.2 - do you mean 1.1? Anyway, here's how to do it: in 1.1: (I think. it's been a while) [controller] $this->set('usertypes', $this->User->Usertype->generateList()); [view] selectTag('User/usertype_id', $usertypes, $html->tagValue('User/usertype_i

Re: Confused using forms (i think!)

2008-01-21 Thread hydra12
I haven't ever tried this, but I think that $this->User->Usertype- >find() needs to be $this->User->Usertype->findAll() if you want to get a list of all the different user types. Best way to do this - use bake to make your views, then see how it handles this. On Jan 19, 3:57 pm, judouk <[EMAIL P

Confused using forms (i think!)

2008-01-19 Thread judouk
Sorry guys - another newbie question. I've got an install of cake 1.2 I have a users table which I have associated with a usertypes table. My database setup (cut down for simplicity) is; create table usertypes ( id int(10) not null auto_increment, choice varchar(100) not null, ) type = myisam;

Re: AJAX Strategies (about forms and adding new "items")

2007-12-20 Thread [EMAIL PROTECTED]
Thanks for your input. The overhead for each request could be a killer if I start building a very fragmented ajax-heavy interface. I have started testing a small prototype interface. The initial page is loaded containing invisible "templates" for letting javascript add new form data (there are s

Re: AJAX Strategies (about forms and adding new "items")

2007-12-18 Thread Andrew Assarattanakul
I've written a form that allowed to create/delete multiple records from a table only when it was saved. The best solution that I could find was to do a big post and build the form so that all of it can be passed to the save function for cake, but had to manipulate the data and saved each part one

AJAX Strategies (about forms and adding new "items")

2007-12-17 Thread [EMAIL PROTECTED]
Hi everyone, I am in the early stages of a new app and like doing more headscratching than coding at this point. I am looking for opinions or links to blog-posts that deal with the following: The short version: When an interface with lots of ajax will finally submit a "new" item consisting of mul

Re: Default Admin Routing for Forms in 1.2 Pre Beta

2007-12-04 Thread Bruno Bergher
Worked like a charm! Thanks a lot. Maybe it's just an isolated case, but I find it weird to have a pre- beta release that is less stable than the alpha one. But baking is gonig great; I have no complains whatsoever. Bruno On Dec 1, 12:04 am, Bruno Bergher <[EMAIL PROTECTED]> wrote: > Thanks a lo

Re: Default Admin Routing for Forms in 1.2 Pre Beta

2007-11-30 Thread Bruno Bergher
Thanks a lot, people. I'll get to it on Monday and comment on the solution. On Nov 30, 2:34 am, Kalileo <[EMAIL PROTECTED]> wrote: > I have suffered the same problems, but fear not, they are solved: > > There have been a few bugs which are all been fixed in the meantime. > These fixes are already

Re: Default Admin Routing for Forms in 1.2 Pre Beta

2007-11-29 Thread Kalileo
I have suffered the same problems, but fear not, they are solved: There have been a few bugs which are all been fixed in the meantime. These fixes are already in the svn. Not in trunk though, but in branches. Take that and it will work again. If you have a modern OS, such as Linux, do something

Re: Default Admin Routing for Forms in 1.2 Pre Beta

2007-11-29 Thread [EMAIL PROTECTED]
I had the same problem, update you core cakephp code with the branch or nightly. That should solve the problem. CSdread On Nov 29, 9:10 am, Bruno Bergher <[EMAIL PROTECTED]> wrote: > Hi everyone! > > We just moved an application we developed in 1.2.0.5427 alpha to the > latest pre beta release.

Default Admin Routing for Forms in 1.2 Pre Beta

2007-11-29 Thread Bruno Bergher
Hi everyone! We just moved an application we developed in 1.2.0.5427 alpha to the latest pre beta release. Everything worked fine except for just one thing: In admin 'edit' actions, FormHelper is being supplied with wrong action URLs. With index, view, add and deletr actions, there's absolutely

Help with multiple ajax forms

2007-11-26 Thread Wi1d
Hello Google CakePHP Group, I'm stumped and thought I'd submit. I'm wanting to create multiple task list and related task on a single view. This view also has multiple forms created using $ajax->form and $ajax->submit that will let me add task to their related tasklist. F

Re: Problem with submitting multiple hidden forms

2007-10-01 Thread AD7six
On Oct 1, 2:28 pm, esedic <[EMAIL PROTECTED]> wrote: > Hi! > If you want to use cake, use cake (see the blog tutorial for a simple start http://manual.cakephp.org/appendix/blog_tutorial). Otherwise this is the wrong group for such a broad and not-at-all-related-to- cake question. hth, AD --

Re: Dynamic edit forms, prepopulation

2007-09-24 Thread [EMAIL PROTECTED]
n('Client/id') wont work with a findall because the > findall results array is slightly different to that of find. > > Geoff > --http://lemoncake.wordpress.com > > On Sep 23, 9:28 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Hello, >

Re: Dynamic edit forms, prepopulation

2007-09-24 Thread [EMAIL PROTECTED]
t;[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I have a page with a list of forms, one form for each row in a table. > > I'm trying to pre-populate all of these forms with one big find(all) > > query. The pre-population nev

Re: Dynamic edit forms, prepopulation

2007-09-23 Thread Geoff Ford
Also - $html->hidden('Client/id') wont work with a findall because the findall results array is slightly different to that of find. Geoff -- http://lemoncake.wordpress.com On Sep 23, 9:28 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I

Re: Dynamic edit forms, prepopulation

2007-09-23 Thread Geoff Ford
http://lemoncake.wordpress.com/2007/08/06/multi-record-forms/ There is also another (cleaner) method in the comments that uses ClassRegistry which I would recommend - I haven't got round to writting a new post on this method yet. Geoff -- http://lemoncake.wordpress.com On Sep 23, 9:

Dynamic edit forms, prepopulation

2007-09-22 Thread [EMAIL PROTECTED]
Hello, I have a page with a list of forms, one form for each row in a table. I'm trying to pre-populate all of these forms with one big find(all) query. The pre-population never seems to happen though, I'm guessing because there are multiple id fields present. Is there any way to tel

Re: Forms that add/edit multiple models

2007-09-18 Thread Geoff Ford
As long as the form elements are named using the cake conventions i.e. name="data[ModelName][fieldName]" (best acheived by using the FormHelper functions) there should be no difference between single and multi-model forms. The only difference is when you need to validate both mod

Forms that add/edit multiple models

2007-09-18 Thread nryan
Hello -- I have another question regarding the 'right way' to do something with cake. I have a form on a page which updates 2 different models. Is there a recommended way to structure the page in cake? Like, where should the form-handling logic go? Anyone have a suggested way to make the most out

Re: EXTJS forms, Cake, and AJAX

2007-09-10 Thread hydra12
That did it! Thanks! On Sep 10, 1:28 pm, majna <[EMAIL PROTECTED]> wrote: > Sory : name form inputs like : data[User][first_name]; > > On Sep 10, 8:27 pm, majna <[EMAIL PROTECTED]> wrote: > > > name form inputs like : data[User][first:name]. > > or > > $this->data['User']['first_name] = $this->p

Re: EXTJS forms, Cake, and AJAX

2007-09-10 Thread majna
name form inputs like : data[User][first:name]. or $this->data['User']['first_name] = $this->params['form'] ['first_name']; ... On Sep 10, 8:15 pm, hydra12 <[EMAIL PROTECTED]> wrote: > I'm trying to use the froms from EXTJS with cake. When my form posts, > this is what is in $_POST: > > [act

Re: EXTJS forms, Cake, and AJAX

2007-09-10 Thread majna
Sory : name form inputs like : data[User][first_name]; On Sep 10, 8:27 pm, majna <[EMAIL PROTECTED]> wrote: > name form inputs like : data[User][first:name]. > or > $this->data['User']['first_name] = $this->params['form'] > ['first_name']; > ... > > On Sep 10, 8:15 pm, hydra12 <[EMAIL PROTECTED]>

EXTJS forms, Cake, and AJAX

2007-09-10 Thread hydra12
I'm trying to use the froms from EXTJS with cake. When my form posts, this is what is in $_POST: [action] => submit [last_name] => Buckner [first_name] => Mark Nothing shows up in $this->data. How do I get it into this format? [data] => Array ( [User]=>Arra

Re: How to prevent ID manipulations in forms?

2007-09-01 Thread Geoff Ford
I think this is what you are looking for http://manual.cakephp.org/chapter/security Geoff -- http://lemoncake.wordpress.com On Sep 1, 12:14 am, "Marcus T. Jaschen" <[EMAIL PROTECTED]> wrote: > MarcusTerasa wrote: > > But if a user manipulates the form and posts a different id, another > > entry

Re: How to prevent ID manipulations in forms?

2007-08-31 Thread Marcus T. Jaschen
MarcusTerasa wrote: > But if a user manipulates the form and posts a different id, another > entry would be updated or created. So in a real world app it would be > a great security risk. > > What could I do to prevent it? Simply check in your Controller action if the user which requests the cha

How to prevent ID manipulations in forms?

2007-08-31 Thread MarcusTerasa
Hi, when I use scaffolding, the edit forms contain a hidden field with the id of the current entry. So at post the app knows which entry has to be updated. But if a user manipulates the form and posts a different id, another entry would be updated or created. So in a real world app it would be

Problems with validation two different forms connected to same model

2007-08-15 Thread mito
I have login form on every page, when user wants to register after submitting register form he gets validation errors from login form, because it wasnt filled. Other words both forms are validated after submitting one of them. Is there a way how to distinguish which form to validate. All ideas

Re: Security component and forms

2007-08-14 Thread Timo Derstappen
probably to make searches linkable. On 8/14/07, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On 8/14/07, Timo Derstappen <[EMAIL PROTECTED]> wrote: > > > > I admit that there are very few use cases, but there is one already > > mentioned by sergerod: searches. Have a look at google's search box.

Re: Security component and forms

2007-08-14 Thread Chris Hartjes
On 8/14/07, Timo Derstappen <[EMAIL PROTECTED]> wrote: > > I admit that there are very few use cases, but there is one already > mentioned by sergerod: searches. Have a look at google's search box. So because Google uses a GET form for doing searches, that is somehow the accepted way to do it? T

Re: Security component and forms

2007-08-14 Thread Timo Derstappen
I admit that there are very few use cases, but there is one already mentioned by sergerod: searches. Have a look at google's search box. On 8/14/07, Chris Hartjes <[EMAIL PROTECTED]> wrote: > > On 8/14/07, teemow <[EMAIL PROTECTED]> wrote: > > > > What's the security difference between GET and PO

Re: Security component and forms

2007-08-14 Thread Chris Hartjes
On 8/14/07, teemow <[EMAIL PROTECTED]> wrote: > > What's the security difference between GET and POST. This has nothing > to do with security. My fault for not fully explaining myself. You are correct that GET and POST have nothing to do with security. > Semantically and for the sake of REST: I

Re: Security component and forms

2007-08-14 Thread teemow
e make > > an ability to switch off form data validation and autocreation of > > hidden '__Token' fields when using Security and form/ajax helper in > > Cake 1.2. > > > I know about Controller->disableFields. But automatically generated > > __Tokens are i

Re: Security component and forms

2007-08-13 Thread [EMAIL PROTECTED]
I use these forms to make a custom filters or searches. On Aug 13, 4:09 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 8/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > A small request for developers of Security component. :-) Please mak

Re: Security component and forms

2007-08-13 Thread Chris Hartjes
> Cake 1.2. > > I know about Controller->disableFields. But automatically generated > __Tokens are inserted into the form anyway. This is not good for forms > with GET method. > Why would you EVER use a form that uses the GET method. That's like PHP security 101

Security component and forms

2007-08-13 Thread [EMAIL PROTECTED]
__Tokens are inserted into the form anyway. This is not good for forms with GET method. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegr

Re: Error Handling in Ajax Forms

2007-08-10 Thread francky06l
In you ajax submit you can update several div's, so you can have part updating the side bar (no error) or redraw your form. you can either have 2 "views" and you render the one appropriate to the case, of a single view with a conditional update: Hope that helps On Aug 10, 7:36 pm, "[EMAIL PROTEC

Error Handling in Ajax Forms

2007-08-10 Thread [EMAIL PROTECTED]
What I am trying to do is pretty simple, at least in theory. I have a bunch of product pages, and to add a product to your shopping cart, you must select a color for the product and a quantity. Then, when you hit 'add to cart', the form submits the data, and then updates a mini cart in the sidebar

Re: multiple forms of 1 model in same view

2007-07-31 Thread tyhilltx
Fantastic, Geoff! Thanks for the direction and the quick response. I quickly scanned the thread you mentioned and it looks like it will work great. On Jul 31, 6:45 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > I have added section on Frequent Discussions for Multi-record forms. > >

Re: multiple forms of 1 model in same view

2007-07-31 Thread Geoff Ford
I have added section on Frequent Discussions for Multi-record forms. THe basics is you have to create the inputs yourseld rather than use the form helper. Use a structure like data[Modelname][count] [fieldname] as the name of the input then loop over data["Modelname"] in the control

multiple forms of 1 model in same view

2007-07-31 Thread tyhilltx
Hi Bakers! I need to have a small set of input fields that belong to 1 model used 3 times in a view. The business reason is that a user can enter up to 3 different people's contact information along with some other information in one form (one view). My question is how do I set up the view (I'm

Re: A bit of a problem with forms and JavaScript

2007-07-18 Thread DrLaban
This worked perfectly! Thanks alot for your comment! Regards DrLaban On Jul 16, 8:22 am, wralph <[EMAIL PROTECTED]> wrote: > Use the ID, so if you have a textarea with ID of ModelField, then > access using: > > document.getElementById('ModelField').value = 'whatever value you wish > to assign'

Re: A bit of a problem with forms and JavaScript

2007-07-15 Thread wralph
Use the ID, so if you have a textarea with ID of ModelField, then access using: document.getElementById('ModelField').value = 'whatever value you wish to assign'; Winston --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

A bit of a problem with forms and JavaScript

2007-07-14 Thread DrLaban
So I'm trying to figure out how to address the following problem: I'm using a textarea with the name "data[Model][Field]" so I have access to the short hand form validation inside CakePHP. Now, this is becoming a bit of a problem, since I use JavaScript to insert smileys and other code snippets

How to use translated db data in edit and add forms / actions

2007-07-09 Thread oleonav
Hi there, In my Article model two translated fields are used, title & content.The Translation behavior is used. The Article model looks like this: class Article extends AppModel { var $name = 'Article'; var $actsAs = array('Translate' => array('title' => 'TransTitle','content' => 'TransCon

Re: Conditional forms

2007-06-27 Thread dardosordi
When you render the form for second time (added the other form), and the model for the first form has been saved(), you need to put the id of the record in the form on a hidden field to force an update instead of an insert when calling save() fotr the second time (in the other form). All of this a

Re: requestAction, modularity and multiple forms in one view

2007-06-26 Thread abba bryant
I have a variety of forms in a cms I am developing on one page. I use a hidden form field ( I.E. If I was adding an image I would use a $form->input( "Image.AddImage", array( "type"=>"hidden", "value"=>"1")); ) Then my controller ( typi

Re: Conditional forms

2007-06-25 Thread francky06l
you could use some javascript to hide or show the form when the user checks/unchecks the box. If you want the form appearing after submit you can use ajax to update a div with your new form. On Jun 25, 10:40 pm, Mauro <[EMAIL PROTECTED]> wrote: > hi my name is Mauro, > > i'm having a problem: > >

Conditional forms

2007-06-25 Thread Mauro
hi my name is Mauro, i'm having a problem: I have a checkbox in a page, if this checkbox is true another form has to be activated, how can i do that? I tried calling (render) another view with the new form,once submit is push, but the info is saved in another registry on the table (mysql) I do

Re: requestAction, modularity and multiple forms in one view

2007-06-22 Thread R. Rajesh Jeba Anbiah
On Jun 22, 12:40 pm, Vincent <[EMAIL PROTECTED]> wrote: > Hello - > > Did you ever get some answers on that. I have the same problem. I have > 2 forms on my page and I am not sure how to manage them! Not tested, but look for the 'model' option in $form->

Re: requestAction, modularity and multiple forms in one view

2007-06-22 Thread Vincent
Hello - Did you ever get some answers on that. I have the same problem. I have 2 forms on my page and I am not sure how to manage them! -V willi wrote: > Hi there! > > I'am very impressed about the huge capabilities of CakePHP and about > to create a bigger application after p

<    1   2   3   4   5   6   7   >