Re: jQuery with Cake forms

2009-08-26 Thread Matt Curry
This one's pretty easy actually...Just set the input to be type text and attach the datepicker to the id of the input (not the div): input('field', array('type' => 'text')); ?> $(function(){ $('#ModelField').datepicker(); }); -Matt http://www.pseudocoder.com On Aug 26, 10:02 pm, Mi

jQuery with Cake forms

2009-08-26 Thread Mike
Hello! I'm looking to use jQuery with Cake, specifically with a form. My plan was to use a DatePicker (http://docs.jquery.com/UI/Datepicker) control instead of the default datetime drop-down menus, but it looks like the easy approach (give the datetime div an id that jQuery's DatePicker automag

Re: forms in a element

2009-08-05 Thread JamesF
Your form has no name. On Aug 5, 3:15 pm, cakephp_rocks wrote: > hey i created a form in a element and add the to my home page for some > reason when  i submit it it say Invalid form submission and redirect > me to this  '/users/register/' i give to the form any idea > here is what i did > > ec

forms in a element

2009-08-05 Thread cakephp_rocks
hey i created a form in a element and add the to my home page for some reason when i submit it it say Invalid form submission and redirect me to this '/users/register/' i give to the form any idea here is what i did create(null, array('url' => '/users/register/' . $this- >params['url']['url']

Re: Searching and filtering on "id" -- problem with form behavior (forms helper)

2009-07-15 Thread geste
t; value.  I want to give people the ability > > to search and filter by ID and a few other fields like "budget_name". > > I have implemented a filter component that I found (here: > >http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/) > > and i

Re: Searching and filtering on "id" -- problem with form behavior (forms helper)

2009-07-15 Thread Carlos Gonzalez Lavin
evel.pl/index.php/2008/06/cakephp-12-filter-component/) >> and it all works well up to a point, but I am encountering problems >> with the way forms helper works by default. I'll give 2 examples: >> >> If I add the following form bits to my index view: >> >

Re: Searching and filtering on "id" -- problem with form behavior (forms helper)

2009-07-15 Thread Carlos Gonzalez Lavin
people the ability > to search and filter by ID and a few other fields like "budget_name". > I have implemented a filter component that I found (here: > http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/) > and it all works well up to a point, but I am encoun

Re: Searching and filtering on "id" -- problem with form behavior (forms helper)

2009-07-15 Thread Bernardo Vieira
lue. I want to give people the ability > to search and filter by ID and a few other fields like "budget_name". > I have implemented a filter component that I found (here: > http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/) > and it all works well up to a

Searching and filtering on "id" -- problem with form behavior (forms helper)

2009-07-15 Thread geste
onent that I found (here: http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/) and it all works well up to a point, but I am encountering problems with the way forms helper works by default. I'll give 2 examples: If I add the following form bits to my index view: echo $form->creat

Re: Forms with multiple tables

2009-07-04 Thread Hendry
Hi Travis, Please read http://book.cakephp.org/view/438/displayField Regards, Hendry On Sun, Jul 5, 2009 at 7:36 AM, Travis wrote: > Thanks, That worked. > > I have one more question, is there a way I can tell it what field to > put in the select, right now it is using the field "name" and

Re: Forms with multiple tables

2009-07-04 Thread Travis
ill automatically > pick up and set as the values of your Field.farm_id input - which will > become a select. > > > > -Original Message- > From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf > > Of Travis > Sent: Saturday, 4 July

RE: Forms with multiple tables

2009-07-03 Thread Paul
->Farm->find('list')); } This will set values to your view that the form helper will automatically pick up and set as the values of your Field.farm_id input - which will become a select. -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.co

RE: Forms with multiple tables

2009-07-03 Thread Paul
So you have your view views/fields/add.ctp create('Field')?> create('Field')?> -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Travis Sent: Saturday, 4 July 2009 3:34 a.m. To: CakePHP Subject: Forms with

Forms with multiple tables

2009-07-03 Thread Travis
I am new to cakePHP and am in the process of learning to use it. I am wondering how I can have a form element populated with elements from a different table than the model, for example I am wanting to write a farm manager using cakePHP as the framework, if I have fields that belong to farms, whe

Re: Forms and saveAll

2009-06-25 Thread John Andersen
Hi Dave, It is written in the CookBook at: http://book.cakephp.org/view/75/Saving-Your-Data Look at saveAll as well as the subsection at: http://book.cakephp.org/view/84/Saving-Related-Model-Data-hasOne-hasMany-belongsTo All is explained there :) Enjoy, John On Jun 25, 4:10 pm, "Dave Mahara

Forms and saveAll

2009-06-25 Thread Dave Maharaj :: WidePixels.com
Just a question about figuring out how to aproach this situation. If you think of a resume you may have more than 1 education / work history...so on User hasMany "educations" so in the case of a resume how could you create 1 form that would load all of the users educations they have created? So

Re: JQuery forms

2009-06-02 Thread brian
On Mon, Jun 1, 2009 at 8:20 PM, Dave Maharaj :: WidePixels.com wrote: > > i am trying to submit a form using jQuery and no luck. > > I load the form first into a div. > > $("a.edit_user").click(function(){ >  var data_id = $(this).attr('id'); >  $("#loading").show(function(){ >         alert(data

JQuery forms

2009-06-01 Thread Dave Maharaj :: WidePixels.com
i am trying to submit a form using jQuery and no luck. I load the form first into a div. $("a.edit_user").click(function(){ var data_id = $(this).attr('id'); $("#loading").show(function(){ alert(data_id); $("#user").load('update/user' , function(){ $("#loading").hide(funct

Re: Forms with math computations and multiple buttons

2009-06-01 Thread espontaneo
c. >> >> > Note that the comment for format() method ("Formats a number into a >> > currency format.") is bogus. That's just been copied from currency(). >> >> -- >> View this message in >> context:http://www.nabble.com/Forms-with-math-c

Re: Handling "minute" and "hour" elements in forms

2009-05-29 Thread Bs
Now there's still one problem...sorry:) Saving to a mysql time field works. But in my edit view the time is not read from the mysql time field. --> probably because it's a "datetime" field in cake and cake wants a year, month, day? --~--~-~--~~~---~--~~ You receiv

Re: Handling "minute" and "hour" elements in forms

2009-05-29 Thread Bs
P.S.: Now i've tested it with a "time" column type and it worked!!! Thanks!!! On 27 Mai, 17:02, Stu wrote: > ps: The view code should look something like this: > > echo $form->dateTime('column_name', 'NONE', '12'); > > The '12' just represents the format, you can either choose '12' (e.g. > 11:1

Re: Handling "minute" and "hour" elements in forms

2009-05-29 Thread Bs
Thanks, the input fields work but cake still saves NULL values in the database in this case. The problem seems to be that only "hour" and "minute" get set but cake doesn't set any year, month or day informations in the datetime field. The result is a null value in my datetime column in mysql. My

Re: Forms with math computations and multiple buttons

2009-05-29 Thread Mark
ride the defaults with the $options array if you > > don't want a dollar sign, etc. > > > Note that the comment for format() method ("Formats a number into a > > currency format.") is bogus. That's just been copied from currency(). > > -- > View

Re: Forms with math computations and multiple buttons

2009-05-28 Thread espontaneo
ency format.") is bogus. That's just been copied from currency(). > > -- View this message in context: http://www.nabble.com/Forms-with-math-computations-and-multiple-buttons-tp23718059p23772979.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~-~--~~--

Form Helper to build Multiple Forms from data array from Find ('all')

2009-05-28 Thread christo
Hi, I'm pretty new to cakephp, so thank in advance for any input. I am attempting to build a series of forms in a view with form helper based on a set of data from a find('all') in my controller. The layout is that I have a course table and a schedule table, with each schedule

Re: Forms with math computations and multiple buttons

2009-05-27 Thread brian
wrote: >> >> >> I'm not sure what you mean. sprintf()? >> >> http://www.php.net/manual/en/function.sprintf.php >> >> > -- > View this message in context: > http://www.nabble.com/Forms-with-math-computations-and-multiple-buttons-tp23718059p2375

Re: Forms with math computations and multiple buttons

2009-05-27 Thread espontaneo
the net about this, but I can't get enough information. brian-263 wrote: > > > I'm not sure what you mean. sprintf()? > > http://www.php.net/manual/en/function.sprintf.php > > -- View this message in context: http://www.nabble.com/Forms-with-math-computatio

Re: Forms with math computations and multiple buttons

2009-05-27 Thread brian
Model->save($this->data); >>> >>>                $this->Session->setFlash('Deductions has been added to >>> employee', 'success'); >>>                $this->redirect(array('action' => 'list_deduction'))

Re: Handling "minute" and "hour" elements in forms

2009-05-27 Thread Stu
ps: The view code should look something like this: echo $form->dateTime('column_name', 'NONE', '12'); The '12' just represents the format, you can either choose '12' (e.g. 11:15 am) or '24' (e.g. 23:15) --~--~-~--~~~---~--~~ You received this message because you

Re: Handling "minute" and "hour" elements in forms

2009-05-27 Thread Stu
Hey, sorry for the late reply. For time data, I still use the $form->dateTime function, there is a parameter that voids the Date value. If you check out the source code, it explains it all. API: http://api.cakephp.org/class/form-helper#method-FormHelperdateTime Source: http://api.cakephp.org/v

Re: Handling "minute" and "hour" elements in forms

2009-05-27 Thread Brendon Kozlowski
x27;s also a thing I still don't understand about the hour and minute > fields. Are they really associated with a "datetime" field in mysql? > Cause there's an actual "datetime" input type in cake forms and my > experiments with hour & minute form fields in cake

Re: Handling "minute" and "hour" elements in forms

2009-05-27 Thread Brendon Kozlowski
d minute > fields. Are they really associated with a "datetime" field in mysql? > Cause there's an actual "datetime" input type in cake forms and my > experiments with hour & minute form fields in cake and datetime > columns didn't work, yet. > >

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
int field for setting "0" or "1" That's also a thing I still don't understand about the hour and minute fields. Are they really associated with a "datetime" field in mysql? Cause there's an actual "datetime" input type in cake forms and my experim

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Brendon Kozlowski
Although there are some discrepancies or missing inforrmation in the Cookbook, the nice thing is that we, as a community, can offer suggestions to improve it. It's basically a huge moderated Wiki (or integrated and web-based Trac system for documentation). ...either way, even without a definition

Re: Forms with math computations and multiple buttons

2009-05-26 Thread espontaneo
>                $this->Session->setFlash('Deductions has been added to >> employee', 'success'); >>                $this->redirect(array('action' => 'list_deduction')); >>        } >> >> Also, if you notice the . &#

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Hi Brendon, the problem I have with the Cookbook is that many methods aren't documented that well. The "minute" function for example...I couldn't find any info what values are allowed for "attributes". The method is just defined but not documented that well. On 26 Mai, 20:24, Brendon Kozlowski

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Thanks christo, I'll look into the stuff you wrote. I didn't understand it fully, but I'll look into it more closely tomorrow. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group,

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Brendon Kozlowski
It doesn't look like you're using the FormHelper's methods properly. Looking at the API, and just the minute's method, I see it's incorrectly used. function minute($fieldName, $selected = null, $attributes = array(), $showEmpty = true){ //... } Check the book (book.cakephp.org) and Core Helpe

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread christo
ically though. By the way if you are using versions before 1.2 the method in the controller is: $this->cleanUpFields() cheers On May 26, 8:14 am, Bs wrote: > Hi, > > I'm new here and just wanna say first that I'm absolutely in love with > CakePHP and will definitely d

Re: Forms with math computations and multiple buttons

2009-05-26 Thread brian
           $this->Session->setFlash('Deductions has been added to > employee', 'success'); >                $this->redirect(array('action' => 'list_deduction')); >        } > > Also, if you notice the . '.00' I have in my Comput

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Hi Stu, I tried it out with "datetime" column but that doesn't work, either. Result is "null" in the column. Here's part of my code: add.cpt: ... Opening time from hour ('OpeningStartHours',1,6);?> : minute ('OpeningStartMinutes',0,null,"00");?>

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Hi Stu, thanks for your answer. I used "time" as column type, cause the start and end time in my model has nothing to do with any date, but only with the time of day (general opening times for a store, for example). So I'll have to use "datetime" as column and then simply ignore the date part (wi

Re: Handling "minute" and "hour" elements in forms

2009-05-26 Thread Stu
This is strange, I had to double check in my app to check it out. It is normal for cake to store dateTime information in an array, and it "Should" save it correctly to your MySql table. Could you send your controller and view code? Taking a shot in the dark, I'd think it's because of your colum

Re: Cakephp Forms Security Flaw

2009-05-26 Thread @zghanv/-
/The-Cake-Blog-Tutorial > > > Here I see a big security flaw ... and I think this practice is used > > throughout the framework. > > > #  function add() > > # { > > # if (!empty($this->data)) > > # { > > # if ($this->Post->save($this->data)) &

Handling "minute" and "hour" elements in forms

2009-05-26 Thread Bs
Hi, I'm new here and just wanna say first that I'm absolutely in love with CakePHP and will definitely donate for this project. This framework saves me work each day. I have a question about handling "minute" and "hour" elements in forms. I'm using those for

Forms with math computations and multiple buttons

2009-05-26 Thread espontaneo
I am currently working on a form that will have two buttons: Compute and Add. What I wanted to do: click Compute button->computed values will populate fields->click Add button(submit form) So when I click on my Compute button, the salary will be passed on a component I made and will be processed

Forms with math computations and multiple buttons

2009-05-26 Thread espontaneo
' I have in my Compute button code above, I'm having problems with formatting the computed values in a money format so for now, I'm concatenating the result with the decimal point. But I want to do it properly. I've tried to use the number helper and I've searched through

Re: Cakephp Forms Security Flaw

2009-05-04 Thread BeroFX
('Your post has been saved.','/posts'); > # } > # } > # } > > We create HTML forms input with name like 'data[Post][field_name]' ... > and on post back we can access it using $this->data. > > and that data array contains array of "Post"

Cakephp Forms Security Flaw

2009-05-04 Thread AzGhanv/.
$this->flash('Your post has been saved.','/posts'); # } # } # } We create HTML forms input with name like 'data[Post][field_name]' ... and on post back we can access it using $this->data. and that data array contains array of "Post" as in our input name.

Re: Forms - How to give an ID or class to my reset button

2009-05-03 Thread Bankai
Thanks! On 4 mayo, 13:22, "Bogdan I. Bursuc" wrote: > echo $form->button('Reset', array('type' => 'reset', 'id' => > 'resetBtn')); > > On Sun, 2009-05-03 at 11:15 -0700, Bankai wrote: > > How to give an ID to my reset button so that I can style it with CSS. > > > Please advise. > > > This is

Re: Forms - How to give an ID or class to my reset button

2009-05-03 Thread Bogdan I. Bursuc
echo $form->button('Reset', array('type' => 'reset', 'id' => 'resetBtn')); On Sun, 2009-05-03 at 11:15 -0700, Bankai wrote: > How to give an ID to my reset button so that I can style it with CSS. > > Please advise. > > This is what I have: > echo $form->button('Reset', array('type'=>'reset'));

Forms - How to give an ID or class to my reset button

2009-05-03 Thread Bankai
How to give an ID to my reset button so that I can style it with CSS. Please advise. This is what I have: echo $form->button('Reset', array('type'=>'reset')); This is the output: This is something like I need to style it: --~--~-~--~~~---~--~~ You received thi

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

2009-04-24 Thread rartavia
In Controller I do "$this->Denouncement->saveAll($this->data)" and all saves correctly excepting for one relation: Denouncements hasMany Sections and Sections hasMay SectionParts. Sections saved correctly (Denouncement hasMany Section) but SectionParts are not being saved, i guess because I'm incl

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

2009-04-23 Thread rartavia
In Controller I do "$this->Denouncement->saveAll($this->data)" and all saves correctly excepting for one relation: Denouncements hasMany Sections and Sections hasMay SectionParts. Sections saved correctly (Denouncement hasMany Section) but SectionParts are not being saved, i guess because I'm incl

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

2009-04-23 Thread rartavia
Thanks a lot to both of you yodi and Miles J. I took Miles J concept and did my complex scenario, got great results, I was able to read correctly in the controller with $this->data In JavaScript I created an array with all my info by doing array.push ("data[...][...]="+value) and then, $.ajax({da

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

2009-04-23 Thread rartavia
Thanks a lot to both of you yodi and Miles J. I took Miles J concept and did my complex scenario, got great results, I was able to read correctly in the controller with $this->data In JavaScript I created an array with all my info by doing array.pop ("data[...][...]="+value), and then, $.ajax({da

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

2009-04-22 Thread Miles J
You have to send it within a data array like so: jQuery.ajax({ type: "POST", url: '/controller/action', data: "data[Model][name]=value&data[name]=value" }); And in the controller: $this->data['Model']['name'] OR $this->data['name'] --~--~-~--~~~--

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

2009-04-22 Thread yodi
On view : var input_id = '2'; $.getJSON("http://website/controller/action",{id:input_id},function(data){ // callback if(data.result){ } }); On Controller : $this->params['url']['id']; On Wed, 2009-04-22 at 12:36 -0700, rartavia wrote: > Hello, I'm wondering how to make

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

2009-04-22 Thread rartavia
Hello, I'm wondering how to make jQuery.ajax call to cake when you need to send parameters both simple values or complex (json, objects, etc). I've two scenarios, one is not to send a form but a really complex js object, how do I send it with jQuery.ajax? The second is, also not sending a form but

Re: Pagination in Search Forms

2009-04-11 Thread Sourav
Thanks a lot, it works perfect ! On Apr 11, 12:39 pm, Miles J wrote: > You would have to remove the array_map, and do your own loop. > > $clean = array(); > foreach ($this->data[Inflector::camelize($model)] as $data) { >         $clean[] = (is_array($data)) ? implode(',', $data) : urlencode > ($

Re: Pagination in Search Forms

2009-04-11 Thread Miles J
You would have to remove the array_map, and do your own loop. $clean = array(); foreach ($this->data[Inflector::camelize($model)] as $data) { $clean[] = (is_array($data)) ? implode(',', $data) : urlencode ($data); } --~--~-~--~~~---~--~~ You received this m

Re: Pagination in Search Forms

2009-04-10 Thread Sourav
Thanks I went thru your tutorial & it worked (in general). However there is a problem : In my search form there is a multiple selection list, which generates an array in the POST data. $this->data contains the following: Array ( [Job] => Array ( [job_category_id] => Arr

Re: Pagination in Search Forms

2009-04-10 Thread Miles J
First off it should be $this->paginate['Job'] = and secondly you do not pass $this->data to the paginator. Are you trying to save the forum values into the url? If so take a look at my tutorial here: http://www.milesj.me/blog/read/30/proxy-search-_-doing-a-search-while-using-named-parameters --~-

Re: Little problem with "edit" forms

2009-04-10 Thread brian
Do you have a route for this action? I'm wondering if it's related to something I've seen. Also, is there any chance that $utente_id is being set somewhere as, eg "4/4"? Maybe put echo $utente_id in your view to see if it's being set like that. On Fri, Apr 10, 2009 at 7:53 AM, Ernesto wrote: >

Little problem with "edit" forms

2009-04-10 Thread Ernesto
Hello. i have a view, located @ CakeROOT/applicazione/utenti/modifica/ [utente_id] - "modifica" it's the italian equivalent of "edit" - "utente" it's the italian equivalent of "user" I'm working with a legacy DB. I can't fully respect Cake's conventions. This view contains a form, coded this w

Pagination in Search Forms

2009-04-10 Thread Sourav
I am building a search form which allows users to search for Jobs by category, location & job title. My controller code is as follows: function search() { if(!empty($this->data)) { $title = $this->data['Job']['title']; $location = $this->data['Job']['location']; $this->p

Re: LI instead of DIV as global preference in forms

2009-03-30 Thread logout
Well, the only thing I can think of is to extend the FormHelper and redefine the input function to add the 'div'=>array('tag'=>'li') option to the rest of your options every time you use it. On Mar 30, 1:07 pm, mintao wrote: > Hi, > > in every form-view I change the default "div" to an "li" like

LI instead of DIV as global preference in forms

2009-03-30 Thread mintao
Hi, in every form-view I change the default "div" to an "li" like that: e($form->input('username', array('label'=>__('Username', true), 'div'=>array('tag'=>'li'; Could anyone please tell me, how to change this globally? Thank you very much Florian Fackler --~--~-~--~~-

Re: Getting started with Ajax Forms

2009-03-18 Thread Stu
Thanks dave, but I still get this weird error... Tells me I have a missing controller: = Missing Controller Error: Controller could not be found. Error: Create the class Controller below in file: App\controllers\controller.php what is that class you're calli

RE: Getting started with Ajax Forms

2009-03-18 Thread Dave Maharaj :: WidePixels.com
; 'user_info', 'class' => 'save_btn', 'loading'=> 'Element.show(\'opt_load\'); new Effect.Opacity(\'user_info\' , { from: 1, to: 0 })', 'loaded'=> 'new Effect.

Re: Getting started with Ajax Forms

2009-03-18 Thread Stu
Using this piece of code will redirect me back to my index function properly but will not save any data: form('add', 'post', array( 'model'=>'Model', 'update'=>'content' ) ); ?> in

Re: Getting started with Ajax Forms

2009-03-18 Thread Stu
Thx for the reply Dave do you use: $ajax->form($options) or do you keep the standard: $form->create('Model')? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email t

RE: Getting started with Ajax Forms

2009-03-18 Thread Dave Maharaj :: WidePixels.com
I am no expert so you may get other answers that provide a detailed explanation but this is what I user for my AJAX forms and it works error free. You can add / remove the options as you wish echo $ajax->submit('Submit ', array( &

Getting started with Ajax Forms

2009-03-18 Thread Stu
Does anyone know a good/reliable source to get started with Ajax forms. The cookbook's version seems incomplete and all the tutorials out there (or the ones I could find) seem to be outdated. I just want the standard most simple way to send a frm using ajax (add/ edit) from the same contr

Re: Twist on multirecord forms.

2009-03-17 Thread Richard
Hi, $model->updateAll might be your friend in this case. You could do something like: $this->Task->updateAll("Task.date" => $value); Richard On Mon, Mar 16, 2009 at 9:02 PM, gc1155 wrote: > > I've read up on multirecord forms and I think I have the basic

Twist on multirecord forms.

2009-03-16 Thread gc1155
I've read up on multirecord forms and I think I have the basics down using Cake 1.2. However, what if I want to make one modification and have it apply to several records? For instance, given a "Task" model with a Day field. I'd like to be able to pick a day and submit the

Re: Variable state through multiple Ajax requests (ModalBox) including forms

2009-03-16 Thread Milmar
Hello, Since this is resolved, may you share the working example? I'd like to use it as reference since I'm working on something similar. Thanks. -Milmar On Jan 16, 8:43 pm, WebbedIT wrote: > Resolved thanks to Martin's help in the following thread ... > > http://groups.google.com/group/cake

Re: default value in forms from datatable

2009-03-11 Thread Diego Caro A.
On Wed, Mar 11, 2009 at 12:55 PM, Paco Gomez wrote: > ... > > I don't know if it's possible to fill inputs fields of form in the > view automaticly from the dataTable Users Yes, is possible, editing $this->data variable in the controller of the view. For example, you want fill the input User.us

Re: default value in forms from datatable

2009-03-11 Thread brian
On Wed, Mar 11, 2009 at 11:55 AM, Paco Gomez wrote: > > Hi, > > I'm newbie in cakephp, I have the typical form for Users with their > profile information: > Username > SureName > Email > ... > > I don't know if it's possible to fill inputs fields of form in the > view automaticly from the dataTab

default value in forms from datatable

2009-03-11 Thread Paco Gomez
Hi, I'm newbie in cakephp, I have the typical form for Users with their profile information: Username SureName Email ... I don't know if it's possible to fill inputs fields of form in the view automaticly from the dataTable Users Thank you very much in advantage. --~--~-~--~~--

Re: Submit several forms with a button

2009-02-28 Thread keogh
This actually might work, thanks to all for your advices, they give direction =]. Regards from Mexico On 27 feb, 06:12, Stinkbug wrote: > So let's think about this.  Is your client just worried about how the > form looks (3 buttons and 1submitall button)?  Technically, if there > is no reason

Re: submitting forms outside Auth

2009-02-27 Thread foldiman
roblem..users login, logout, > admin working fine, etc. > > However, I have a few forms (contact, password recovery) that are not > connected to models and need to be accessible to all users. The pages > themselves are easily accessible using the allow() method. But when > the form is

submitting forms outside Auth

2009-02-27 Thread foldiman
I'm using the Auth component with no problem..users login, logout, admin working fine, etc. However, I have a few forms (contact, password recovery) that are not connected to models and need to be accessible to all users. The pages themselves are easily accessible using the allow() method

Re: Submit several forms with a button

2009-02-27 Thread Stinkbug
So let's think about this. Is your client just worried about how the form looks (3 buttons and 1 submit all button)? Technically, if there is no reason to have 3 separate forms, don't create 3 separate forms, unless the client requirement is calling the programming shots too. It'

Re: Submit several forms with a button

2009-02-26 Thread keogh
@scs Yes, it's necessary to have the 3 forms separately and one submit all button =S, it's the client requirements, you know how strict they are =S. @brian that could be usefully, thanks. If anybody could suggest anything else, I'll appreciate it. Thanks On 26 feb, 12:07, sc

Re: Submit several forms with a button

2009-02-26 Thread scs
I s there any reason you need this a seprate forms and not just use one form? On Feb 26, 1:35 pm, brian wrote: > You need to add a javascript onclick handler for the button that would > then submit each form asynchronously. There are a number of ways to do > this, including serialising

Re: Submit several forms with a button

2009-02-26 Thread brian
t;call the view" I'm not sure, what you mean. Each controller action will have its own view. But, since you'll need to use AJAX in order to submit 3 forms simultaneously, you can simply update the current page with the output from each of the actions. I suppose Cake's AjaxHelper

Submit several forms with a button

2009-02-26 Thread keogh
Hi, I have 3 separately forms in the same view, each with its own submit button, what I want is to put one button that submits all the 3 forms to its respectively controllers then I call the view where the 3 forms are. Is there a way to do this with CakePHP? Is there any advice that you can give

Jquery Forms

2009-02-19 Thread WidePixels
Can someone point me in the right direction here, been looking online and can not find anything. What I want to do is have an "edit" button on my page so the user can edit his selections. Idea is on the profile page the user has his selected "Artists". Now I want to add the "edit" button which wil

Re: Auth/ACL - edit forms and password problems

2009-02-17 Thread Chris
Thanks, that will be a lot cleaner than doing it in the controller and messing about with the raw post data. On 16 Feb, 16:50, "dr. Hannibal Lecter" wrote: > I hope this might be of some help: > > http://dsi.vozibrale.com/articles/view/manually-hashing-password-and-... > > On Feb 16, 5:21 pm, Ch

Re: Auth/ACL - edit forms and password problems

2009-02-16 Thread dr. Hannibal Lecter
I hope this might be of some help: http://dsi.vozibrale.com/articles/view/manually-hashing-password-and-password-validation On Feb 16, 5:21 pm, Chris wrote: > Perhaps I am just having a blonde moment, but I seem to be having > difficulties with ACL and passwords. > > I followed the example > a

Auth/ACL - edit forms and password problems

2009-02-16 Thread Chris
Perhaps I am just having a blonde moment, but I seem to be having difficulties with ACL and passwords. I followed the example at http://book.cakephp.org/view/641/Simple-Acl-controlled-Application and then once I was confident of what I was doing implemented it into my current project. It has al

Re: Problem with forms : some fields are blank in edit mode

2009-02-13 Thread netedo
Thanks for your answers. It appears that the problem occures with special characters and accents. But I don't know how to solve that. Any idea ? Thanks. Ed On 13 fév, 11:00, grigri wrote: > Hi Ed, > > Some browser (eg FF) may override the contents of the form fields on > page load. > > Check

Re: Problem with forms : some fields are blank in edit mode

2009-02-13 Thread grigri
Hi Ed, Some browser (eg FF) may override the contents of the form fields on page load. Check the generated source code and see if the `value` attribute is correctly and consitstently filled. It it is, then your cake code is fine. You can force the browser to use the values you specified by calli

Problem with forms : some fields are blank in edit mode

2009-02-13 Thread netedo
Hello, Here my strange problem : I have got o simple form with one table. The add works well, like the view mode. That means, data is saved directly. But in the edit mode, sometimes, a field appears blank. Other times all fields appear with the right data. I can't understand... and I tested in l

Re: Ajax Forms

2009-01-31 Thread brian
It's pointing to edit() automatically because Cake found the Artist ID. You need to specify the form action to override that behavior: $form->create('Artists', array('action' => 'edit_artists')); On Sat, Jan 31, 2009 at 12:20 AM, WidePixels wrote: > > Wondering how to create form that will edit

Ajax Forms

2009-01-30 Thread WidePixels
Wondering how to create form that will edit on a specific table. Example is I have a User that on their Profile has data that relates to a HABTM set up. For example on the user Profile there are blocks of data that represent Artists, Genres, and Favorites which all belong to the User. So when the

Re: Forms to create Users from another controller

2009-01-27 Thread WebbedIT
I would do this using the saveAll() function as it saves a good few lines of code, but I believe your issue is that you're not calling $this->User->Employer->create(); before saving your Employer record. However it also seems as though you're doing this back to front?!? If you have created two m

Re: Questions about forms / validation

2009-01-18 Thread brian
You have to set a condition to ignore this user's DB row: $conditions['NOT'] = array('id' => $this->data[$this->name]['id']); On Thu, Jan 15, 2009 at 2:45 AM, Miles J wrote: > > So Im working on this area where users can edit their profile, etc. > All the validation works, its just on the email

Re: Questions about forms / validation

2009-01-18 Thread Webweave
The only reason your data would be getting reset, would be that you've done a find again before the form is redisplayed. Could you post the code for your edit so we can see what you're doing ? On Jan 14, 11:45 pm, Miles J wrote: > So Im working on this area where users can edit their profile, e

<    1   2   3   4   5   6   7   >