Re: Cake 3 - Modelless Forms with nested forms / elements

2015-06-02 Thread slowjack2k
Hi Karthik, I don't know how your answer should solve my problem. Maybe I didn't explain it enoug. I would like to have a Form, where I can fill in multiple Phonenumbers and I don't know bevor hand how many phone numbers there will be. After receiving the data from the user I want to validate

Re: Cake 3 - Modelless Forms with nested forms / elements

2015-06-01 Thread Karthik Keyan
Hi, Create the form name in /src/UserForm1.php namespace App\Form; use Cake\Form\Form; use Cake\Validation\Validator; class UserForm1 extends Form { protected function _buildValidator(Validator $validator) { return $validator -notEmpty('annul_income',

Cake 3 - Modelless Forms with nested forms / elements

2015-05-31 Thread slowjack2k
Hi, within the documenation I did only find a simple example (http://book.cakephp.org/3.0/en/core-libraries/form.html). Is it possible to create a form with Sub-Forms? class PhoneNumberForm extends Form end class ContactForm extends Form{ protected function _buildSchema(Schema $schema

mathematical operations with forms in cakephp

2015-01-12 Thread Jorge I Pineda G
Buenas tardes, ante todo un cordial saludos para todos en el foro. tengo un inconveniente, y necesito ayuda. por favor serian tan amables de ayudarme con información , textos, ejemplos, para realizar operaciones matematicas en cakephp, el problema es que aun soy muy novato y se me complica un

Get blackholed all my forms functions on servers

2014-06-03 Thread Victor Vargas
Hi all!, This is my problem, I have try on my local server simple forms with the security component, and they work perfectly. But I try this on my 1and1 server and i get blackholed this form. Any idea? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http

Validate Dynamic Forms

2014-05-22 Thread Advantage+
I am building a questionnaire where the user can add questions to a form (either yes or no or text answer response) So the Question has id, quiz_id, question, type (text or true / false), But how would you validate this? In the view I simply do a foreach ($questions as $question){ echo

Re: Validate Dynamic Forms

2014-05-22 Thread Stephen S
You can add and remove validation rules on the fly before you check if the form is valid. http://book.cakephp.org/2.0/en/models/data-validation.html#dynamically-change-validation-rules On 22 May 2014 19:50, Advantage+ movepix...@gmail.com wrote: I am building a questionnaire where the user

RE: Validate Dynamic Forms

2014-05-22 Thread Advantage+
To: cake-php@googlegroups.com Subject: Re: Validate Dynamic Forms You can add and remove validation rules on the fly before you check if the form is valid. http://book.cakephp.org/2.0/en/models/data-validation.html#dynamically-change-validation-rules On 22 May 2014 19:50, Advantage

Question about cakephp forms and JS

2014-02-26 Thread Thomas Goeminne
I would like to store it. Normally I use the upload plugin from Jose gonzalez, but not sure if it can handle the raw data. So maybe I need save it first to the server. This will not be a problem. The main problem is how I can get the dataURL into the forms canvas. Greets, Thomas -- Like Us

Questions regarding editing data in forms

2014-01-06 Thread RoadRunner
Hi, i'm new to CakePHP and try to build my first database application. So far i can list all customers in my test-database and view/edit a customer via a link with the customer id passed as a named parameter. At the moment i have 2 links to different controllers in each row of the customer

Re: Questions regarding editing data in forms

2014-01-06 Thread Stephen S
Hey RoadRunner I'm not sure I would use named parameters to update records like that, I understand your concern and I think I would share the same concerns. It sounds like you want to be able to edit multiple records in place without having to view each individual record in a edit page, and go

Submitting FormHelper forms in Internet Explorer 8

2013-07-13 Thread Kieran Barnes
I have a Cake 2.2.8 application with a whole collection of forms. All work perfectly in IE9/Chrome/usual suspects. When submitting a form in IE8, it doesn't work, just reloads the page. The add method for the controller method code is fairly basic; public function add() { // KB

HABTM and forms

2013-06-25 Thread Gabriele Carioli
Hi everybody, I'm struggling with a particular hasAndBelongsToMany form data problem and need some help. Quickly: 1. A recipe can have many ingredients. 2. An ingredient can be in many recipes. 2. An ingredient in a recipe can be mandatory or optional (or not present). 4. an ingredient in a

Re: Multiple Forms on the same form

2013-03-28 Thread david . suna
I have done this using AJAX. Have the button fire an AJAX event which calls an action on your controller which returns an empty workcenter section of the field. Pass in to the AJAX call an index and have the form fields specified using the index. When the form is submitted you would then

Multiple Forms on the same form

2013-03-24 Thread Steven Scaffidi
Let's say I had a model called factory, and I wanted to add multiple workcenters to the factory. When I go to add a new factory, I want a button on the bottom of my form that says add workcenter. I want that button to be always there just in case they want to add multiple work centers. I don't

Re: Getting values from forms

2013-02-13 Thread Varahalu Naidu Alugubilli
ve the same problem in cake php, can you explain how u did that? plz... reply to avnaidu...@gmail.com On Sunday, February 10, 2013 10:08:36 PM UTC+5:30, Diego Turcios wrote: Hi I need a view with two textbox for getting this values for doing a query This is my view reporteiario.ctp

Re: Getting values from forms

2013-02-13 Thread Yvon-René Blanchard
What is the error you get? What is the query that is passed to the db? $f is what before is been sent? On Sunday, February 10, 2013 11:38:36 AM UTC-5, Diego Turcios wrote: Hi I need a view with two textbox for getting this values for doing a query This is my view reporteiario.ctp

Getting values from forms

2013-02-10 Thread Diego Turcios
Hi I need a view with two textbox for getting this values for doing a query This is my view reporteiario.ctp h1Reporte Diario/h1 ?php echo $this-Form-create('dates'); echo $this-Form-input('Inicio'); echo $this-Form-input('Fin'); echo $this -Form-end('Generar Reporte'); ? This is my

HTML in forms

2013-01-16 Thread Advantage+
I have integrated CKEditor with a file browser / uploads and all that is working fine except the actual image part. If I used the editor to create a table, ul ol lists the html saves in the database fine. But whenever I insert an image the code gets encoded. Example1: Random elements /

Correct way to handle ajax forms

2013-01-01 Thread Advantage+
Just wondering what is the correct way to handle processing forms submitted via ajax / json response? What I have been doing is converting my add / edit forms into a single element and placing them into the view/add/edit where needed so on error all I need to do is return the form element

Re: Correct way to handle ajax forms

2013-01-01 Thread lowpass
and return just the form portion of a view. On Tue, Jan 1, 2013 at 1:45 PM, Advantage+ movepix...@gmail.com wrote: Just wondering what is the correct way to handle processing forms submitted via ajax / json response? What I have been doing is converting my add / edit forms into a single element

RE: Correct way to handle ajax forms

2013-01-01 Thread Advantage+
@googlegroups.com Subject: Re: Correct way to handle ajax forms I haven't done much AJAX stuff with 2.2.x yet but that's basically what I've always been doing. Generally, my add and edit templates just include the form.ctp element. In that I have a switch($this-params['action']) to decide how to open

Re: Using jQuery.ajax - Sending non-forms values to server

2012-11-29 Thread Blues Clues
Hi Miles You are the man. I have been pulling my hair over this, wanting to send parameters to my jquery calls without using some temporary form. I am so happy today. Thank you, thank you and thank you. -Sri Adhi On Wednesday, April 22, 2009 5:17:58 PM UTC-4, Miles J wrote: You have to send

Login Forms

2012-07-13 Thread Andrew Johnston
Hello Everyone- I'm new to CakePHP and I'm a bit confused with the idea of login forms. I've read just about every page I could find on the issue, but none of them seemed to mirror my problem exactly. I'm using Wordpress for the static portion of my site and I wanted to have a link that said

Re: Login Forms

2012-07-13 Thread Rohit
On Friday, July 13, 2012 2:29:47 AM UTC+5:30, Andrew Johnston wrote: Hello Everyone- I'm new to CakePHP and I'm a bit confused with the idea of login forms. I've read just about every page I could find on the issue, but none of them seemed to mirror my problem exactly. I'm using

Re: Login Forms

2012-07-13 Thread Andrew Johnston
wrote: Hello Everyone- I'm new to CakePHP and I'm a bit confused with the idea of login forms. I've read just about every page I could find on the issue, but none of them seemed to mirror my problem exactly. I'm using Wordpress for the static portion of my site and I wanted to have

Re: Login Forms

2012-07-13 Thread Sam Sherlock
website http://www.eagle.** getyourplugin.com http://www.eagle.getyourplugin.com On Friday, July 13, 2012 2:29:47 AM UTC+5:30, Andrew Johnston wrote: Hello Everyone- I'm new to CakePHP and I'm a bit confused with the idea of login forms. I've read just about every page I could find on the issue

Best practices for AJAX forms

2012-06-25 Thread Florin Trifu
Hi On my page, I have a table with the information of a company and a button to edit the information. On click, through jQuery and AJAX, I want to transform that table into a form, and I can do that either by adding the form with javascript (hard coding it in javascript and requesting from the

Re: Best practices for AJAX forms

2012-06-25 Thread lowpass
Your two options are essentially the same thing. Either way, you're making a request to the controller. Another option would be to include the form in the view from the start, but hide it. Personally, what I usually do is have jquery intercept the edit link and make an AJAX request instead using

Re: Cached Forms Don't Submit

2011-11-06 Thread BlenderStyle
Dividing the form into two actions, one to display and one to save, did the trick. Thanks for the help, 0x20h. I appreciate it. On Oct 30, 12:11 pm, 0x20h k...@informatik.uni-marburg.de wrote: When beforeFilter() gets called cake is already rendering the cached version. (see

Cached Forms Don't Submit

2011-10-30 Thread BlenderStyle
I have setup the index and edit actions to be cached in my PostsController as follows: var $cacheAction = array( 'index' = array('callbacks' = true, 'duration' = '7 days'), 'edit' = array('callbacks' = true, 'duration' = '7 days'), ); Everything is cached as expected, but the

Re: Cached Forms Don't Submit

2011-10-30 Thread 0x20h
When beforeFilter() gets called cake is already rendering the cached version. (see dispatcher::cached() and ViewHelper#__writeFile()). Regarding to the docs its not recommended to use the callbacks ( http://book.cakephp.org/view/1380/Caching-in-the-Controller ) . I would probably try to separate

Re: Embedded forms, model inheritance

2011-10-19 Thread daf182
Hi, First of all I forgot to mention that I'm using CakePhP 2.0, PHP 5.3.1, and MySQL5.1.41, and Apache 2.2.14. Some investigation has been done. So the validation inhereted from the parent model is working. The only thing I had to do is to no to put the name of the parent model on the view as I

Embedded forms, model inheritance

2011-10-18 Thread Gergő Nagy
Hi, I did not find any material about inheritance, and form embedding on cake php sites so far. I tried to use this: http://bakery.cakephp.org/articles/santino83/2011/02/19/behavior_for_model_inheritance_the_missing_feature but did not work perfectly. Basicly I use MTI (multiple table

Node and attachment forms on single page

2011-10-03 Thread Constantin.FF
I am able to upload images and store some of image information in the 'uploads' table, but I need to set the attachment form into the edit nodes pages and use the 'nodes' table for the uploads. So I read the information for multiple forms in same page: http://bakery.cakephp.org/articles/RabidFire

Re: Node and attachment forms on single page

2011-10-03 Thread Constantin.FF
... I tried to change the file input form with simple title and body fields, and to remove the Attachable behavior form the AddAttachment behavior ... and it is working, like this it add new row to the 'nodes' table with correct title adn body -- Our newest site for the community: CakePHP Video

How do I process forms via Ajax for a Quiz-like game in CakePHP?

2011-08-08 Thread ujjain
hours. This leaves me more time for making the game smoother and better. I was using simple forms in the game in PHP, but I would like to do it better this time. I see so much helpers in Cakephp and am not sure what to use. The game is for a my personal language learning site and is like Rosetta

The better way to create many register forms for many types of users?

2011-07-05 Thread castarco
Hello, I'm programming an application that have many types of users (such as Students and Companies), the case is that the register forms should be different for the different types of users... I have the Users, Students and Companies controllers... and my question is, wich is the better place

Re: The better way to create many register forms for many types of users?

2011-07-05 Thread Vulinux
, that is invoked in your after save callback to either build a Student or Company Object and transfer the id of your User to the invoked one. The register method then would be implemented in your User Controller. To display different register forms, you could load different elements for each of your

What's the best way to change select box option labels when using Automagic forms?

2011-06-02 Thread Seth Meranda
I have a standard baked controller with add and edits for a list of students. Each student belongs to one family, so I have this in my Student Model: var $belongsTo = array('Family' = array( 'className' = 'Family', 'foreignKey' = 'family_id') ); In my student view, the Family

Problem with bools and forms

2011-05-09 Thread Ernesto
Hello. when the bool field is FALSE Cake reads that value as (empty value). this is causing some troubles in my newest app, where due to customer's habits i'm using boolean selects (simple select boxes with Yes ans No options) instead of checkboxes. my select boxes' options are defined this

Re: Problem with bools and forms

2011-05-09 Thread Tilen Majerle
check this http://book.cakephp.org/view/1402/options-default http://book.cakephp.org/view/1402/options-defaultand this http://book.cakephp.org/view/1405/options-empty -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/5/9 Ernesto e.fanz...@gmail.com Hello. when the bool field is FALSE

Re: Problem with bools and forms

2011-05-09 Thread Ernesto
Hi Tilen, thanks for your effort. Sadly your solution doesn't work i ended up modifying dbo_source's function boolean from public function boolean($data, $quote = false) { if ($quote) { return !empty($data) ? '1' : '0'; } return !empty($data); } to

User/Admin definable forms (schemaless forms)

2011-04-04 Thread Greg Skerman
Hi, I'm currently toying with the idea of a user definable form. This would allow a site administrator to create new forms to capture various data, and report on the data in the admin section. I've got the basic data structure, being a forms table, having many form_fields, each having one

Re: User/Admin definable forms (schemaless forms)

2011-04-04 Thread gremlin
with the idea of a user definable form. This would allow a site administrator to create new forms to capture various data, and report on the data in the admin section. I've got the basic data structure, being a forms table, having many form_fields, each having one form_field_type, and storing

Re: Building spell check into forms

2011-03-11 Thread chris
a cakePHP question. But as I'm building my application in cakePHP, I just wanted to see if anyone had any advice in the area. I have a requirement to provide a spell check functionality in some of my forms. The input fields are simple 'textarea' fields. Looking around, there seems

Re: Building spell check into forms

2011-03-11 Thread euromark
just wanted to see if anyone had any advice in the area. I have a requirement to provide a spell check functionality in some of my forms. The input fields are simple 'textarea' fields. Looking around, there seems to be a number of solutions. Most, if not all, seem to be javascript

Re: Building spell check into forms

2011-03-11 Thread Dr. Tarique Sani
On Fri, Mar 11, 2011 at 5:21 PM, euromark dereurom...@googlemail.comwrote: nice link - I like the afterthedeadline-style almost better and more powerful as google I would assume and it seems to come with a jquery plugin :) Yes jquery plugin and integration with several WYSIWYG editors FWIW

Building spell check into forms

2011-03-10 Thread chris
I realise that this isn't stictly a cakePHP question. But as I'm building my application in cakePHP, I just wanted to see if anyone had any advice in the area. I have a requirement to provide a spell check functionality in some of my forms. The input fields are simple 'textarea' fields. Looking

Re: Building spell check into forms

2011-03-10 Thread Ryan Schmidt
On Mar 10, 2011, at 10:44, chris wrote: I have a requirement to provide a spell check functionality in some of my forms. Meh. Does anybody actually want that? Why not just use a browser or operating system that already provides spell check on the client side? (e.g. Mac OS X has system-wide

Re: Building spell check into forms

2011-03-10 Thread Dr. Tarique Sani
. I have a requirement to provide a spell check functionality in some of my forms. The input fields are simple 'textarea' fields. Looking around, there seems to be a number of solutions. Most, if not all, seem to be javascript front ends, with a php file that is called to do the spellchecking

Forms, Polls and others..

2011-02-28 Thread Miloš Vučinić
Hi, I am working on a project where I need to make polls and surveys on the web site. Those should be very similar to google spread sheet, but it has to work from my web site. Does anyone know if there are components for form generation or something similar to that, or is there a propper way to

Re: evalScripts and AJAX forms

2011-01-25 Thread Rory
) but the submission of the forms via AJAX does not work. I've used the Web Inspector tool in Safari to inspect the HTML view being returned by the $ajax-link and the appropriate JavaScript is there, however when loaded into the page, the JavaScript is stripped. I thought it may be something to do

Re: evalScripts and AJAX forms

2011-01-25 Thread cricket
On Tue, Jan 25, 2011 at 5:17 AM, Rory rygilchr...@gmail.com wrote: I can't remember if JS has always come back in CDATA tags because like I said, it was working at one point, which would indicate JS wasn't coming back within CDATA tags. If you can't remember whether it was wrapped in CDATA,

evalScripts and AJAX forms

2011-01-24 Thread Rory
submitted updates a status div with the returned AJAX content. This was working fine until a few days ago when it just simply stopped working. The views still load via AJAX ($ajax-link) but the submission of the forms via AJAX does not work. I've used the Web Inspector tool in Safari to inspect the HTML

Re: Dynamic forms

2010-12-20 Thread Andrés Manikis
fields dissapear. I could do it with JQuery or maybe with multipage forms, but the latter is another problem, isn't it? Apart from that, when you say, create the association array what do you mean? Thank you very much for your help. Andrés Check out the new CakePHP Questions site http

Re: Dynamic forms

2010-12-20 Thread cricket
to be able to change the available view fields at runtime. For example, if I check the checkbox, the passport fields would appear and the national document fields dissapear. I could do it with JQuery or maybe with multipage forms, but the latter is another problem, isn't it? You could do it with radio

Dynamic forms

2010-12-18 Thread Andr?s Manikis
Hello. I have the following questions. Let's suppose I have, say, a person model which has an id, a name and a boolean that tells whether this person is native from a specific country or not (for example, native from Argentina or not). In the case of being native, he has a national document,

Re: Dynamic forms

2010-12-18 Thread cricket
On Fri, Dec 17, 2010 at 11:20 PM, Andr?s Manikis andresmani...@gmail.com wrote: Hello. I have the following questions. Let's suppose I have, say, a person model which has an id, a name and a boolean that tells whether this person is native from a specific country or not (for example, native

RE: possible to create a nested post with forms?

2010-12-16 Thread Shinya Koizumi
-learner Sent: Wednesday, December 15, 2010 10:54 PM To: CakePHP Subject: possible to create a nested post with forms? I am trying create a form so that when post that data this will still keep the relationships with other element. Say i have a category name and a subcategory name like shown in below. How

possible to create a nested post with forms?

2010-12-15 Thread cake-learner
I am trying create a form so that when post that data this will still keep the relationships with other element. Say i have a category name and a subcategory name like shown in below. How can i define the form so that the relationship between this category and subcategory will be kept when

Re: Two Forms for the Same Model with two datasets

2010-12-08 Thread NoEvidenZ
I want to create an Order Form with Order positions. If i want to use two Order positions (this IS a Model) on one page, how i will Be able to do this? With 1.OrderPosition.Count or OrderPosition.1.Count? I'm sorry, I can't really follow the question. Can you give us a bit more information

Re: Two Forms for the Same Model with two datasets

2010-12-08 Thread cricket
.Count? If they're two separate forms you shouldn't need to do anything special. If you want to save multiple records from the same form you'll be using saveAll(). See this link for a good writeup on that: http://nuts-and-bolts-of-cakephp.com/2008/08/01/practical-use-of-saveall-part-1-working

Two Forms for the Same Model with two datasets

2010-12-07 Thread Gerrit
Hello everybody, I want to create an Order Form with Order positions. If i want to use two Order positions (this IS a Model) on one page, how i will Be able to do this? With 1.OrderPosition.Count or OrderPosition.1.Count? Thx Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-29 Thread Joshua Muheim
anymore when using the Security component (which I do and I forgot to mention in my first post). Look at this (http://book.cakephp.org/view/175/Security-Component): When using the Security Component you must use the FormHelper to create your forms. The Security Component looks for certain

Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-26 Thread psybear83
Hey everybody In my application, users can edit their email, phone number etc., but they are *not* allowed to edit their username - only admins are allowed to do that. So I'm wondering: is it safe to simply not display the username field to the user? Afaik CakePHP makes sure that the form hasn't

Re: Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-26 Thread Stephen
Hi There You should use a whitelist to specify the fields to save, any other fields will not be saved. Even if you don't display the field on the page, a user can still create the post variable from within their browser and use it to change data they shouldn't really be allowed to. Hope this

Re: Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-26 Thread Joshua Muheim
the FormHelper to create your forms. The Security Component looks for certain indicators that are created and managed by the FormHelper (especially those created in create() and end()). Dynamically altering the fields that are submitted in a POST request (e.g. disabling, deleting or creating new

Re: Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-26 Thread Stephen
://book.cakephp.org/view/175/Security-Component): When using the Security Component you must use the FormHelper to create your forms. The Security Component looks for certain indicators that are created and managed by the FormHelper (especially those created in create() and end()). Dynamically altering

Re: Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-26 Thread odd
to create your forms. The Security Component looks for certain indicators that are created and managed by the FormHelper (especially those created in create() and end()). Dynamically altering the fields that are submitted in a POST request (e.g. disabling, deleting or creating new fields via JavaScript

Re: Forms security: Not displaying input means it is protected? --zivi-muh

2010-11-26 Thread euromark
). Look at this (http://book.cakephp.org/view/175/Security-Component): When using the Security Component you must use the FormHelper to create your forms. The Security Component looks for certain indicators that are created and managed by the FormHelper (especially those created in create

Re: Making Forms using Loops for Populating Multiple Database Entries

2010-11-14 Thread Rameez
No I haven't used Bake as yet, but the structure is really simple. I ll skip the answers part because that is not relevant here Survey Model ---ID (primary key) ---Name Question Model ---ID (primary key) ---Text ---Survey ID (foreign key) so what happens is I am looking at all the surveys I

Re: Making Forms using Loops for Populating Multiple Database Entries

2010-11-14 Thread Rameez
Hey I was looking around in the cake folder and opened to model class to look at how save was working, found this lying in the create() function there $this-id = false; seems to have done the trick, it. Thanks for your help, I am trying to resolve the saveall() issue now, still can get that to

Making Forms using Loops for Populating Multiple Database Entries

2010-11-13 Thread Rameez
I am new to cake php so please bear with me. I am trying to create a survey for which i can create multiple choice questions. i am running into two issues 1) for multiple choice questions i have a form that takes all the answer choices and saves them as separate entries inside the answers

Re: Making Forms using Loops for Populating Multiple Database Entries

2010-11-13 Thread Pablo Terradillos
Have your model the corresponding associations? Questions have many answers? if so, you could check what your form is POSTing using debug($this-data); in order to check if you are making all in a the correct way You may not have any problems putting the form generator in a loop, as long as your

Re: Making Forms using Loops for Populating Multiple Database Entries

2010-11-13 Thread Rameez
Thank you for your response, I in fact did do what you said about the first problem and resolved that error. I was passing the parameter to a page that has a form. The create function in the view, would recall the same action using the $options as 'action'. I added the 'url tag to the' $options

Re: Making Forms using Loops for Populating Multiple Database Entries

2010-11-13 Thread Pablo Terradillos
I'm not sure if i understand correctly your first issue... Have your associated model the corresponding foreign key and, also, a primary key? For example, Questions id text Answers id question_id text Regarding the second issue, remember to enclose modelName.$i.field with double quotes so $i

Re: Making Forms using Loops for Populating Multiple Database Entries

2010-11-13 Thread Pablo Terradillos
Also, have you tried to generate code with bake? it could be helpful or you could see what are you doing wrong at least http://book.cakephp.org/view/1522/Code-Generation-with-Bake Pablo E. Terradillos On Sun, Nov 14, 2010 at 12:43 AM, Pablo Terradillos teh...@gmail.comwrote: I'm not sure if

Re: Named parameters, forms and redirects

2010-11-06 Thread WebbedIT
Nah, deffo not doing anything wrong, just getting used to the framework :) Although I do advise spending time trying to do everything to the best of your ability first time around. You will reuse a lot of CRUD code throughout other models/controllers/views. With my first CakePHP project I had

Re: Named parameters, forms and redirects

2010-11-05 Thread chris
Thanks for your reply and suggestions, I have adjusted my code since and it seems to be working fine, will look at these options as well and see how I can improve it. At least it dosn't sound like I am doing something completely wrong. On Nov 4, 10:05 pm, WebbedIT p...@webbedit.co.uk wrote: As

Named parameters, forms and redirects

2010-11-04 Thread chris
I'm passing a foreign id to my models add funtion via a URL such as /model/add/foreign_id:1 The /add/ method generates an error and redirects if it does not receive this parameter. I assign the foreign id to the model and it auto populates the form if(isset($this-passedArgs['foreign_id']))

Re: Named parameters, forms and redirects

2010-11-04 Thread chris
Thanks for the reply, I seem to have found a way to make this work, by only checking for the parameter if $data is empty, as otherwise the id is kept in the data array. But still not sure if I'm doing things right. To answer your points below 1.This bit of code is the only part which is doing

Re: Named parameters, forms and redirects

2010-11-04 Thread WebbedIT
As I suspected, the issue is when you initially request the form you are passing it in via $_GET as a named parameter, then when you submit the form you change to passing it in via $_POST into the model's data array instead. I actually do it this way myself and have my method specified as

Multiple Forms in the same controller / model to be validated differently?

2010-09-08 Thread Shaz
Here's an old article that shows how to do exactly what I want - but doesn't quite work: http://bakery.cakephp.org/articles/view/multiple-forms-per-page-for-the-same-model Any other way of using CakePHPs form validation on different forms? I have an add, edit function/view/form for my controller

Why cakephp forms doesn't work with jquery (mb)menu ?

2010-08-31 Thread keresh
Hi In my menu (jquery plugin named (mb)Menu) i wrote a simple login form: div id=login class=mbmenu a rel=title Login panel/a a rel=separator /a a rel=text class=rel_text ?php echo $form-create('User', array('action' = 'login')); ? span class=text_formlogin:/spanbr / ?php echo

Re: Models, joins and forms

2010-07-23 Thread Joachim Nyqvist
No need to apologize about language. I was just lazy, so I didn't translate, I just wanted to show which columns where corresponding. Thanks for the answer. I will certainly look into this in detail when I have a little more time over. You're definitely right about dropping the join-table. As

Re: Multiple login forms submitting to one login action

2010-07-23 Thread tersmitten
I already found the solution myself. It was because of the stupid pages controller :-( http://stackoverflow.com/questions/3302798/multiple-login-forms-submitting-to-one-login-action On 22 jul, 19:05, cricket zijn.digi...@gmail.com wrote: On Wed, Jul 21, 2010 at 3:02 PM, tersmitten

Re: Models, joins and forms

2010-07-23 Thread Joachim Nyqvist
I figured it out. I'm suppose to put the belongsTo in the models not the controllers. On 23 Juli, 13:10, Joachim Nyqvist joac...@jnyqvist.se wrote: Ok. I have changed the tables and these are my files: ?php /**  * @property Merit $Merit  */ class Merit extends AppModel {     var $name =

Re: Multiple login forms submitting to one login action

2010-07-22 Thread cricket
On Wed, Jul 21, 2010 at 3:02 PM, tersmitten mischa.ter.smit...@gmail.com wrote: I'm having 2 login forms in my (cake) application. One on the home page (served by pages controller) and one in my user controller. The one from my user controller is working fine. But when I try to login from

Models, joins and forms

2010-07-22 Thread Joachim Nyqvist
Ok, I'm new to Cake, but not php. I don't know how to build my models for easy creation of add, edit and delete actions. I have three tables: The records: CREATE TABLE merits ( meritId int(10) unsigned NOT NULL AUTO_INCREMENT, ar varchar(20) DEFAULT NULL, titel varchar(40) NOT NULL,

Re: Models, joins and forms

2010-07-22 Thread cricket
On Thu, Jul 22, 2010 at 10:36 AM, Joachim Nyqvist joac...@jnyqvist.se wrote: Ok, I'm new to Cake, but not php. I don't know how to build my models for easy creation of add, edit and delete actions. I have three tables: The records: CREATE TABLE merits (  meritId int(10) unsigned NOT NULL

Multiple login forms submitting to one login action

2010-07-21 Thread tersmitten
I'm having 2 login forms in my (cake) application. One on the home page (served by pages controller) and one in my user controller. The one from my user controller is working fine. But when I try to login from the homepage I get a blank page and I see in firebug I got a 404. The strange thing

Re: how to create forms

2010-07-20 Thread gabriel
Here a good tutorial for a contact form! http://snook.ca/archives/cakephp/contact_form_cakephp On Jul 19, 4:14 pm, amr_AJ ramruth...@gmail.com wrote: how to create forms Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

how to create forms

2010-07-19 Thread amr_AJ
how to create forms 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.com

Re: how to create forms

2010-07-19 Thread Ed Propsner
http://book.cakephp.org/view/1384/Creating-Forms On Mon, Jul 19, 2010 at 10:14 AM, amr_AJ ramruth...@gmail.com wrote: how to create forms Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you

Re: Forms/Model SQL Error

2010-06-30 Thread John Andersen
Please provide more information! - Specify how the User model is defined together with the validation. Question: - is your controller named Register or Registers? In your form create statement you name it Register! Enjoy, John On Jun 29, 10:50 pm, Nabeel nab...@nsslive.net wrote: Hi all,

Forms/Model SQL Error

2010-06-29 Thread Nabeel
Hi all, I'm trying to create a form - I have a Users model with some simple validation. I'm creating a form with: http://bin.cakephp.org/view/2134760139 The output from this on the page is: http://bin.cakephp.org/view/220211324 Hmm, that's not right. So I turn up debug:

forms

2010-06-22 Thread mirfan
Hi, Its very urgent and rediculus that my cakephp application is not creating form, any where in my application i am generating form they are are not created either through echo $form-create() or through html form tag form please help me. Check out the new CakePHP Questions site

Re: forms

2010-06-22 Thread Jeremy Burns | Class Outfit
Help us to help you. If forms are not being created, what IS happening instead? Are you getting errors? Do you have debug set to 2 so that you can see what's going on? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Jun 2010, at 08:46, mirfan wrote: Hi

Re: forms

2010-06-22 Thread Andrei Mita
If form/form doesn't work, then most probably it's not a cake issue. Set debug to 2 and check what errors do you get. On Tue, Jun 22, 2010 at 10:46 AM, mirfan m.irfa...@gmail.com wrote: Hi, Its very urgent and rediculus that my cakephp application is not creating form, any where in my

  1   2   3   4   5   6   >