Re: how to abort save?

2009-05-26 Thread Teh Treag
not be saved in the database. i'm using foreach loop for my saveAll for each of the fields so i want to know how to abort the save for the empty ones. On May 22, 11:12 pm, forrestgump vikhya...@gmail.com wrote: Just follow the links provided by Teh Treag . Basically u need to define

Re: how to abort save?

2009-05-25 Thread cakephp101
thanks for the reply but the thing is it's ok for the field to be empty but it should not be saved in the database. i'm using foreach loop for my saveAll for each of the fields so i want to know how to abort the save for the empty ones. On May 22, 11:12 pm, forrestgump vikhya...@gmail.com wrote

Re: how to abort save?

2009-05-25 Thread andy
want to know how to abort the save for the empty ones. On May 22, 11:12 pm, forrestgump vikhya...@gmail.com wrote: Just follow the links provided by Teh Treag . Basically u need to define the validation function in your Model to make sure the field it not empty . forrestgump On May 22

Re: how to abort save?

2009-05-25 Thread cakephp101
but the thing is it's ok for the field to be empty but it should not be saved in the database. i'm using foreach loop for my saveAll for each of the fields so i want to know how to abort the save for the empty ones. On May 22, 11:12 pm, forrestgump vikhya...@gmail.com wrote: Just follow

Re: how to abort save?

2009-05-22 Thread Dr. Loboto
You should use validation for it. On May 22, 12:15 pm, cakephp101 valenzuela...@gmail.com wrote: yes, i mean fields in a table. i'm doing a timesheet for a payroll. the start sched, end sched, time in and time out of the employee are the input. that means i have 4 fields. i have 5 rows of

Re: how to abort save?

2009-05-22 Thread Teh Treag
cakephp101, I think you should start checking out the section of the book on validation - http://book.cakephp.org/view/125/Data-Validation Specifically, I think you want to read this section - http://book.cakephp.org/view/740/notEmpty -teh On May 22, 12:15 am, cakephp101

Re: how to abort save?

2009-05-22 Thread cakephp101
how? i'm sorry i just learned cakephp few weeks ago. On May 22, 2:52 pm, Dr. Loboto drlob...@gmail.com wrote: You should use validation for it. On May 22, 12:15 pm, cakephp101 valenzuela...@gmail.com wrote: yes, i mean fields in a table. i'm doing a timesheet for a payroll. the start

Re: how to abort save?

2009-05-22 Thread forrestgump
Just follow the links provided by Teh Treag . Basically u need to define the validation function in your Model to make sure the field it not empty . forrestgump On May 22, 12:06 pm, cakephp101 valenzuela...@gmail.com wrote: how? i'm sorry i just learned cakephp few weeks ago. On May 22,

how to abort save?

2009-05-21 Thread cakephp101
i have 5 rows of forms for date and time. when only 4 out of the 5 forms are not null, how can i abort the save for the empty/null form? ps, the 5 forms are submitted at the same time so i only have to abort the save for the form/s with no entered value.

Re: how to abort save?

2009-05-21 Thread JamesF
can you clarify what you mean 'by rows of forms' i assume you mean fields in a table... On May 21, 10:29 pm, cakephp101 valenzuela...@gmail.com wrote: i have 5 rows of forms for date and time. when only 4 out of the 5 forms are not null, how can i abort the save for the empty/null form?

Re: how to abort save?

2009-05-21 Thread cakephp101
yes, i mean fields in a table. i'm doing a timesheet for a payroll. the start sched, end sched, time in and time out of the employee are the input. that means i have 4 fields. i have 5 rows of those 4 fields. the 5 rows is equal to 5 days because 1 row is equal to 1 day. when i only put input in