Re: Data Validation: Checking if at least one field is populated and multiple rules not validating

2014-07-17 Thread seba
27;label' => false, 'before' => 'Last Name *', 'class' => 'form-control', 'placeholder' => 'Last Name', 'div' => 'form-group col-sm-12', 'error' => array( 'attributes' =>

Data Validation: Checking if at least one field is populated and multiple rules not validating

2014-07-15 Thread seba
Folks, I'm trying to ensure at least one of two fields (last_name or email) is being populated. Each field also has multiple rules. I'm using CakePHP version 2.4.2. The problem I have at the moment, after multiple permutations of updating and/or moving around the use 'last', 'allowEmpty', 're

Re: Miles Johnson Uploader saves corrupt (empty) images

2014-04-06 Thread seba
ks like: echo $this->Form->create('ModelName', array('enctype' => 'multipart/form-data')); Made the update, and images are being uploaded with content (and there might have been a face-palm at some point after this update)! On Monday, 7 April 2014 11:50:54 U

Re: Miles Johnson Uploader saves corrupt (empty) images

2014-04-06 Thread seba
;ve been having a similar problem. I upload an image, but the resulting > file is 900b and consists only of my HTTP PUT request. > > On Friday, April 4, 2014 12:10:51 AM UTC-4, seba wrote: >> >> I'm using the Miles Johnson Uploader to upload and resize images. I'm

Miles Johnson Uploader saves corrupt (empty) images

2014-04-03 Thread seba
I'm using the Miles Johnson Uploader to upload and resize images. I'm finding that images are being uploaded to the correct location and the respective database table column is being updated with the correct path and file name, however, the images that are being saved to the server directory ar

Re: Customise authError message class

2013-12-12 Thread seba
o view this page.'); $this->Auth->flash['params']['class'] = 'alert alert-danger'; //Add this line to control output auth flash class } On Thursday, 12 December 2013 23:46:39 UTC+11, seba wrote: > > I'm looking for advice on how to custo

Customise authError message class

2013-12-12 Thread seba
I'm looking for advice on how to customize the authError message class (I'm using Twitter Bootstrap, so would like to use the alert styles from Bootstrap). In /Controller/AppController.php I have the following snippet: public function beforeFilter() { //Set custom authError message if user tr

Re: dd-mm-yyyy datetime format in input/datepicker field reverts to default format on refresh after error

2013-12-04 Thread seba
;d-m-Y', strtotime($this->request->data['Model']['issue_date']));} I've used the same snippet on my edit function also (successfully), so that when a user goes to edit the record, the date is rendered in the input field in the correct format. On Monday, 2 Dece

dd-mm-yyyy datetime format in input/datepicker field reverts to default format on refresh after error

2013-12-02 Thread seba
A well-worn topic I'm sure.. Some background: *In the /View/Model/add.ctp view*, I have a few of datetime fields that use the Bootstrap datepicker and (successfully) sets the format of the dates in the text inputs in dd-mm- format: *Example of a datetime field input:* echo $this->Form->in