Re: datetime form helper.. need to display only AM/PM instead of hours and minutes

2014-08-24 Thread FandaR
gt; MySQL and just save "AM" as for example "Y-m-d 10:00" and "PM" as "Y-m-d > 20:00" in the database so I dont need to change the structure and just > modify the datetime form helper somehow? > > Thank You for your suggestions > > Frank

datetime form helper.. need to display only AM/PM instead of hours and minutes

2014-08-24 Thread FandaR
forms on every page? I would like to ideally keep the datetime format in MySQL and just save "AM" as for example "Y-m-d 10:00" and "PM" as "Y-m-d 20:00" in the database so I dont need to change the structure and just modify the datetime form helper

Re: 3.x - Form Helper - checkbox nested in

2014-07-10 Thread mark_story
Yes. But it involves nesting all the inputs inside their labels. By setting the 'label' template to contain {{input}} you can nest inputs in the labels. Additionally, you should remove {{input}} from the various container templates you are using or you'll get two inputs. -Mark On Wednesday, 9

3.x - Form Helper - checkbox nested in

2014-07-08 Thread Thomas von Hassel
Hey Is there a non-hacky way to nest the checkbox into it's label via the string templates ? /thomas -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP"

Weird problem with Form Helper and cache

2013-12-06 Thread HK
I use cake some years now from v1.2 I will write down a problem I had just to share it with you and find out whether it's a bug or not. In my app controller in beforeFilter I have: > if (($newarticles = Cache::read('newarticles', 'short')) == null) > > { > > $this->loadModel('Article'

Re: Form Helper - Checkboxes

2013-07-16 Thread Frank de Graaf (Phally)
Is there perhaps any JavaScript that might cause this behavior or maybe an invisible DOM element that is floating above the checkbox due to some CSS issues? The code itself looks alright, though I think you can leave the value and the hiddenField out. Op dinsdag 16 juli 2013 17:21:08 UTC+2 schr

Form Helper - Checkboxes

2013-07-16 Thread April DeRossett
I am fairly new to cake, and this is actually the first time I have needed to use checkboxes. Here is a screen capture of my form and you will notice that there are multiple che

Re: Form helper not adding "required" class to fields from deep model associations

2013-05-20 Thread Alex Bovey
deeply associated models have the error class > applied if I try to submit the form having left them blank, which is great. > > The problem is that the Form helper isn't adding the "required" class to > the div of any deeply associated models - e.g.: > >

Form helper not adding "required" class to fields from deep model associations

2013-05-17 Thread Alex Bovey
eft them blank, which is great. The problem is that the Form helper isn't adding the "required" class to the div of any deeply associated models - e.g.: - echo $this->Form->create('MyModel'); echo $this->Form->input('MyModel.required_field); //

Re: html attributes on 'year' form helper

2012-10-04 Thread Paul Willis
2 schrieb Mike Griffin: > It seems that the year helper doesn't support html attributes. Looking > at the API (http://api.cakephp.org/class/form-helper#method-FormHelperyear), > it only accepts a small subset of the options that other form helper > functions support. I guess this

Re: html attributes on 'year' form helper

2012-10-04 Thread euromark
use Form->input() and type=>date + dateFormat=>Y Am Donnerstag, 4. Oktober 2012 09:51:31 UTC+2 schrieb Mike Griffin: > > It seems that the year helper doesn't support html attributes. Looking > at the API (http://api.cakephp.org/class/form-helper#method-FormHelperyear),

Re: html attributes on 'year' form helper

2012-10-04 Thread Mike Griffin
It seems that the year helper doesn't support html attributes. Looking at the API (http://api.cakephp.org/class/form-helper#method-FormHelperyear), it only accepts a small subset of the options that other form helper functions support. I guess this is because it returns a SELECT element and

html attributes on 'year' form helper

2012-10-03 Thread Paul Willis
Despite having read over the relevant sections of the book I can't seem to get the stuff working properly with $this->Form->year form helper in 2.2.2 Any other standard input select like... echo $this->Form->input( 'category', array(

Re: Translation of month names in Form-Helper input fields

2012-08-16 Thread Alexander Schiebel
Thanks a lot. This works perfectly :-) Am Mittwoch, 15. August 2012 10:45:45 UTC+2 schrieb majna: > > Cake uses 'cake' i18n domain for translations in Form helper > > __d('cake', 'January') > > Use console to extract translations `cake i

Re: Translation of month names in Form-Helper input fields

2012-08-15 Thread majna
Cake uses 'cake' i18n domain for translations in Form helper __d('cake', 'January') Use console to extract translations `cake i18n extract` or create cake.po and add needed translations manually On Tuesday, August 14, 2012 10:46:58 AM UTC+2, Alexander Schi

Translation of month names in Form-Helper input fields

2012-08-14 Thread Alexander Schiebel
It works whereever I use __('January'), which is replaced by 'Jänner'. But the Pull-Down-Menus (displaying the names of the month) generated by the Form-Helper are not translated so far. I guess I have to implement this using LC_TIME, right? Could anyone please give me a h

Re: Overriding form helper error messages in CakePHP 2.0

2012-08-10 Thread William Notowidagdo
Hi Richard, Same here. I'm using 2.2.1. Though the doc said we can do that http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html On Monday, October 24, 2011 9:44:33 PM UTC+7, Richard@Home wrote: > > Hi all. > > I have the following $validate in my User model: > > var $validat

Re: Form Helper usage question

2012-04-06 Thread Mike Griffin
input('username', array ('type'=>'text', > 'label'=>'Usuario')); >   $this->Form->input('email', array ('type'=>'email', 'label'=>'Email')); >   $this->Form->input('pa

Form Helper usage question

2012-04-06 Thread ldardick
Hi there, I'm a new user of this Framework and I've been reading the Cookbook the last few days. Today I started my first Cake app and I have a problem regarding the Form Helper usage since it doesn't creates the form in the view. *My model code is:* *My Controller Code (A

Form helper issue with euro symbol

2012-02-28 Thread Kro
Hi, I have a form input which is taking in a rate title. This has worked fine in the past but when a euro symbol is added to a title Cake doesn't seem to be converting it to '&euro' as I would expect. The core file, layout and database are all using utf-8 encoding. I'm just wondering if there is so

Re: Issue with Form Helper array('type' => 'file')

2012-02-25 Thread Kro
Couldn't have done it without you...cheers... On Feb 25, 8:17 pm, jeremyharris wrote: > Awesome, glad you figured it out! > > > > > > > > On Saturday, February 25, 2012 10:48:59 AM UTC-8, Kro wrote: > > > Thank you so much, it's working now! You were spot on, it was the > > Couplers beforesave th

Re: Issue with Form Helper array('type' => 'file')

2012-02-25 Thread jeremyharris
Awesome, glad you figured it out! On Saturday, February 25, 2012 10:48:59 AM UTC-8, Kro wrote: > > Thank you so much, it's working now! You were spot on, it was the > Couplers beforesave that was unsetting the data. I have stopped it > doing that now and I can't see why that would cause any othe

Re: Issue with Form Helper array('type' => 'file')

2012-02-25 Thread Kro
Thank you so much, it's working now! You were spot on, it was the Couplers beforesave that was unsetting the data. I have stopped it doing that now and I can't see why that would cause any other issues. The change I have made is as follows: function beforeSave(&$Model) { if (!$M

Re: Issue with Form Helper array('type' => 'file')

2012-02-24 Thread jeremyharris
Okay I think I misspoke. You do need the coupler. (Sorry lack of docs and it's been a while since I had to configure.) I'd stick some debug statements through all of the behaviors' beforeSave calls to try and figure out what's happening. I'm suspicious that the rate data is being removed in Cou

Re: Issue with Form Helper array('type' => 'file')

2012-02-24 Thread Kro
Thanks for your reply. Okay, sounds like it could be related to the Coupler then. I tried removing the Coupler and the 'Rate' data is then saving correctly but the image is missing. I am using 'dirname' and 'basename' fields in the 'Rate' table rather than using a separate Attachment table, does th

Re: Issue with Form Helper array('type' => 'file')

2012-02-23 Thread jeremyharris
What behaviors are you using besides Transfer? Coupler tends to mess with the data because it expects *just* the fields in the Media.Attachment model. Try removing Coupler if it's attached (since you're not using it). Also, unit tests are your friend. It would be much easier to try things and d

Re: Issue with Form Helper array('type' => 'file')

2012-02-23 Thread Kro
Thanks for taking the time to reply @jeremyharris. The record is still getting written but the 'Rate' data is missing. The following is an example of a saved record. As you can see the 'Rate' data is missing. Array ( [Rate] => Array ( [id] => 92 [id_ref] =>

Re: Issue with Form Helper array('type' => 'file')

2012-02-23 Thread jeremyharris
What do you mean by corrupted? It should fail gracefully and stop the save process if there's an error. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP relate

Issue with Form Helper array('type' => 'file')

2012-02-23 Thread Kro
I am saving a Rate record and an associated image using the Media plugin (https://github.com/davidpersson/media). Everything works fine when an image is added, when an image isn't added the Rate record gets corrupted. The array is as follows: Array ( [Rate] => Array ( [enabled] => 0 [is_corporate

ENUM support in Form Helper magic field

2012-02-15 Thread תמר קליין
Hi I added support for enum in Form Helper magic field. It's creating select field by default, but 'radio' type will work too. The patch fits cakePHP 2.0.6, but I think it is very ease to apply the changes to other versions. Tamar Klein Atar + Plus -- Our newest site fo

Re: Form Helper: How can I control the HTML output? Specifically for radio buttons and check boxes

2011-12-21 Thread euromark
you could probably extend the form helper (FormExtHelper etc) and work your changes in in this class. you could also try to use inputDefaults() in each form, but will be less DRY. On 20 Dez., 23:04, Ronen Amiel wrote: > Hey everyone, > > I'm trying to get the hang of CakePHP, I r

Form Helper: How can I control the HTML output? Specifically for radio buttons and check boxes

2011-12-21 Thread Ronen Amiel
Hey everyone, I'm trying to get the hang of CakePHP, I really like the way this framework is built, but I'm having a lot of trouble getting my code right with the form helper class. I find it very hard to get the HTML I want from an input without inserting a lot of my html int

Re: Overriding form helper error messages in CakePHP 2.0

2011-10-28 Thread Jeremy Burns | Class Outfit
Just did some testing. It worked for a rule 'notempty' but is ignored for the rule 'unique' (or isUnique). Jeremy Burns Class Outfit http://www.classoutfit.com On 28 Oct 2011, at 16:43, Richard@Home wrote: > Shamless bump! > > On Oct 24, 3:44 pm, "Richard@Home" wrote: >> Hi all. >> >> I hav

Re: Overriding form helper error messages in CakePHP 2.0

2011-10-28 Thread Richard@Home
Shamless bump! On Oct 24, 3:44 pm, "Richard@Home" wrote: > Hi all. > > I have the following $validate in my User model: > >         var $validate = array( >                 'email'=>array( >                         'required'=>array( >                                 'rule'=>'notEmpty', >        

Overriding form helper error messages in CakePHP 2.0

2011-10-24 Thread Richard@Home
Hi all. I have the following $validate in my User model: var $validate = array( 'email'=>array( 'required'=>array( 'rule'=>'notEmpty', 'message'=>'cannot be blank'

Re: Form Helper error in method year with field with multiple name

2011-10-05 Thread byqsri
If I use echo $form->year('test.0.variables', 2008, 2010); with 3 fields then it works I think that is a bug of cake Can someone help me to control where is the problem? Many Thanks On 5 Ott, 16:08, byqsri wrote: > Can someone give me anu suggestion? > Many thanks > > On 5 Ott, 11:10, byqsri wro

Re: Form Helper error in method year with field with multiple name

2011-10-05 Thread byqsri
Can someone give me anu suggestion? Many thanks On 5 Ott, 11:10, byqsri wrote: > Hi , I have a problem with the helper Form with the method year when I > have field with name  that are some incapsulated array . > For example If I write : > echo $form->year('test.0.variables.test', 2008, 2010); .

Form Helper error in method year with field with multiple name

2011-10-05 Thread byqsri
Hi , I have a problem with the helper Form with the method year when I have field with name that are some incapsulated array . For example If I write : echo $form->year('test.0.variables.test', 2008, 2010); . The name of the resulting select is wrong instead of data[test][0][variables][test] it i

Re: multiple select box. automagic form helper problem

2011-09-21 Thread WebbedIT
Robert, No, there is no bug, what you're trying to achieve has nothing to do with saving data. You're creating a control mechanism where a checkbox designates if an action should be performed on a row or not. Cake has no built in functionality to deal with this. One way to achieve what you want

Re: multiple select box. automagic form helper problem

2011-09-20 Thread rockbust
Hi Jeremy, Thank you so much for the reply. I kind of got it working. after searching some old posts it seems it is a possible bug with the security component. http://groups.google.com/group/cake-php/browse_thread/thread/bc953181eb49d1db/802799a13bdb5a11?lnk=gst&q=security+component+not+posting#8

Re: multiple select box. automagic form helper problem

2011-09-20 Thread Jeremy Burns | Class Outfit
A checkbox only holds true or false, but you are trying to store the user id in it. I'd change it to a 'selected' field and then inspect $this->data for array keys where 'selected' => true. I'd retain your user id field too (as a text field) otherwise you won't know the ids of the selected rows.

multiple select box. automagic form helper problem

2011-09-20 Thread rockbust
I just can not figure this out. Read the book http://book.cakephp.org/#!/view/1390/Automagic-Form-Elements in my user_index view I am looping through the results of the find(all). for each pass of the foreach I want to set a checkbox so I can mass select each user_id. I can not get the multiple ch

Re: Form-Helper (kind of disfunction)

2011-07-23 Thread func0der
> > > > > > > > > > $this->Form->Create('pages',array('url'=>''/admin/pages/display/ > > > > > > > > > admin_home)); > > > > > > > > > > On 24 jun, 19:10, func0der wrote: > > >

Re: Form-Helper (kind of disfunction)

2011-07-15 Thread euromark
t;''/admin/pages/display/ > > > > > > > > admin_home)); > > > > > > > > > On 24 jun, 19:10, func0der wrote: > > > > > > > > > > Hey guys, > > > > > > > > > > i'm havin

Re: Form-Helper (kind of disfunction)

2011-07-15 Thread func0der
min_home)); > > > > > > > > On 24 jun, 19:10, func0der wrote: > > > > > > > > > Hey guys, > > > > > > > > > i'm having a formular present on all sites with the action for > > > > > > > > this > > >

Re: Form-Helper (kind of disfunction)

2011-07-07 Thread euromark
sites with the action for > > > > > > > this > > > > > > > formular located in the beforeFilter function of the > > > > > > > AppController. > > > > > > > It's kind of a language switcher. This is bec

Re: Form-Helper (kind of disfunction)

2011-07-07 Thread func0der
> On 24 jun, 19:10, func0der wrote: > > > > > > > Hey guys, > > > > > > > i'm having a formular present on all sites with the action for this > > > > > > formular located in the beforeFilter function of the AppController. > > >

Re: Form-Helper (kind of disfunction)

2011-07-06 Thread euromark
switcher. This is because i want to have the > > > > > action of that formular set to the current site url. > > > > > > To create this form i use "$this->Form->create('')" in the view. It is > > > > > working just fine with controller action

Re: Form-Helper (kind of disfunction)

2011-07-06 Thread func0der
on of the AppController. > > > > It's kind of a language switcher. This is because i want to have the > > > > action of that formular set to the current site url. > > > > > To create this form i use "$this->Form->create('')" in the

Re: Form-Helper (kind of disfunction)

2011-07-03 Thread euromark
a language switcher. This is because i want to have the > > > action of that formular set to the current site url. > > > > To create this form i use "$this->Form->create('')" in the view. It is > > > working just fine with controller actions l

Re: Form-Helper (kind of disfunction)

2011-07-03 Thread func0der
$this->Form->create('')" in the view. It is > > working just fine with controller actions like "/companies/index" but > > with params like in "/admin/pages/display/admin_home" (in this case it > > is "admin_home") which is routed t

Re: Form-Helper (kind of disfunction)

2011-06-28 Thread Francisco ACLima
;')" in the view. It is > working just fine with controller actions like "/companies/index" but > with params like in "/admin/pages/display/admin_home" (in this case it > is "admin_home") which is routed to "/admin" it is not working. >

Form-Helper (kind of disfunction)

2011-06-24 Thread func0der
form i use "$this->Form->create('')" in the view. It is working just fine with controller actions like "/companies/index" but with params like in "/admin/pages/display/admin_home" (in this case it is "admin_home") which is routed to "/admin&q

Re: Form helper input select box customization

2011-05-30 Thread ShadowCross
just column named with > "name"? > > To rephrase, basically I want to view different column values under > form helper input() rather than just one column value under select box > as it will give additional information under edit.ctp or add.ctp views. -- Our newest site f

Re: Form helper input select box customization

2011-05-30 Thread Shaz
just column named with > "name"? > > To rephrase, basically I want to view different column values under > form helper input() rather than just one column value under select box > as it will give additional information under edit.ctp or add.ctp views. -- Our newest site

Form helper input select box customization

2011-05-30 Thread Jae Choi
Hi all, Is there a way we can show multiple columns to select when selecting belongsto values in edit.ctp view rather than just column named with "name"? To rephrase, basically I want to view different column values under form helper input() rather than just one column value under sel

Re: Form helper suppresses attributes of hidden fields?

2011-05-10 Thread dreamingmind
le][batch][]', > > > >     'id' => null, > > > >     'class' => 'batch', > > > >     'type' => $type > > > > )); > > > > > produces this html: > > > > > > > > c

Re: Form helper suppresses attributes of hidden fields?

2011-05-10 Thread euromark
; > produces this html: > > > > > > class=" "> > > > > While, simply changing the value of $type: > > > > $type = 'text'; > > > echo $form->input('ImageImgFileBatch', array( > > >     'value'

Re: Form helper suppresses attributes of hidden fields?

2011-05-09 Thread Tilen Majerle
x27;data[Image][img_file][batch][]', > > 'id' => null, > > 'class' => 'batch', > > 'type' => $type > > )); > > > > produces this html: > > > > > class=" "> > >

Re: Form helper suppresses attributes of hidden fields?

2011-05-09 Thread dreamingmind
changing the value of $type: > > $type = 'text'; > echo $form->input('ImageImgFileBatch', array( >     'value' => 1, >     'name' => 'data[Image][img_file][batch][]', >     'id' => null, >     'class' =&g

Form helper suppresses attributes of hidden fields?

2011-05-09 Thread dreamingmind
atch', 'type' => $type )); produces this html: While, simply changing the value of $type: $type = 'text'; echo $form->input('ImageImgFileBatch', array( 'value' => 1, 'name' => 'data[Image][img_file][batch][]'

Re: form helper hides all form inputs

2011-03-24 Thread Ryan Schmidt
On Mar 24, 2011, at 12:56, arron wrote: > Sorry i wasnt clear the form is not fixed, but if i remove my plugin > you can see everything. > > I am pretty sure becasue the html helper is outputting id="default" name="submit" method="post" action="/online/ > relates/add"> name="_method" value="PO

Re: form helper hides all form inputs

2011-03-24 Thread arron
Sorry i wasnt clear the form is not fixed, but if i remove my plugin you can see everything. I am pretty sure becasue the html helper is outputtinganything that is a filedset will not be visible On Mar 24, 10:50 am, "web" wrote: > If i remove stepy you can see my whole 300 line form. > > I h

Re: form helper hides all form inputs

2011-03-24 Thread web
If i remove stepy you can see my whole 300 line form. I hard coded the fieldsets like so because I couldn't figure out how to do it threw cake. The jquery plugin works by each step is broken up by a legend and a field set First Owner Information

Re: form helper hides all form inputs

2011-03-24 Thread Stephen
Did you try disabling stepy and seeing if your form generates? That will help identify if it's an issue with jquery or cakephp On 24 March 2011 14:54, arron wrote: > I tried all of the aboive and i still have the same problem and yes im > using 1.2 > > is there a way to disable the fieldset fea

Re: form helper hides all form inputs

2011-03-24 Thread arron
I tried all of the aboive and i still have the same problem and yes im using 1.2 is there a way to disable the fieldset feature ? On Mar 24, 3:20 am, Stephen wrote: > Hi Jeremy > > It'll work on both versions, but $this->Form is preferred in 1.3. > > > > I didn't know that, good to know > > I n

Re: form helper hides all form inputs

2011-03-24 Thread Stephen
Hi Jeremy It'll work on both versions, but $this->Form is preferred in 1.3. > I didn't know that, good to know I notice he wasn't echoing anything for the inputs. > He was using php short tags input(..); ?> is the same as input; ?> Short tags will become depreciated so it's best to avoid. --

Re: form helper hides all form inputs

2011-03-24 Thread Jeremy Burns | Class Outfit
It'll work on both versions, but $this->Form is preferred in 1.3. I notice he wasn't echoing anything for the inputs. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 24 Mar 2011, at 10:03, Stephen wrote: > > > On 24 March 2011 09:18, Jeremy Burns | Class O

Re: form helper hides all form inputs

2011-03-24 Thread Stephen
On 24 March 2011 09:18, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > Use "echo $this->Form->" as well. > Would $form->create(); and input() work in 1.3? He said it was working until he passed the ID default, I'm under the assumption that he's using 1.2 -- Kind Regards St

Re: form helper hides all form inputs

2011-03-24 Thread Jeremy Burns | Class Outfit
uld say it isn't a jquery problem as > the html is generated by the server. > > On 23 March 2011 23:58, arron wrote: > I am using a jquery plugin stepy which turns my long form into a > wizard. > My whole form is written to comply with the form helper > > example

Re: form helper hides all form inputs

2011-03-24 Thread Stephen
I would try writing the form without using shorttags wrote: > I am using a jquery plugin stepy which turns my long form into a > wizard. > My whole form is written to comply with the form helper > > example > >create('relate',array('id'=>'

form helper hides all form inputs

2011-03-23 Thread arron
I am using a jquery plugin stepy which turns my long form into a wizard. My whole form is written to comply with the form helper example create('relate',array('id'=>'default','name'=>'submit'));?> input(&#x

CakePHP 1.3.8 - commit 5464ed8 introduced a new bug in Form helper?

2011-03-21 Thread Peter Jankovich
After upgrading form 1.3.7 to 1.3.8 we encountered a problem with handling custom field names. This commit is supposed to fix custom name attributes, but when we pass a name that ends in a "[]" it is not handled correctly. This example code produces the following: $this->Form->fields = array( 'Mod

Re: Advanced Form, use Form Helper?

2011-02-26 Thread kdubya
What "extra parameters"? Post a bit code showing how you use the date picker without CakePHP and we may be able to suggest how to do it using the $form->input() method. Ken -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: Advanced Form, use Form Helper?

2011-02-25 Thread Bart Claessens
erle wrote: > of course u use Form helper and build just divs for datepicker manually, > other with form helper :D > > > -- > Lep pozdrav, Tilen Majerle > http://majerle.eu > > > > 2011/2/25 Bart Claessens > Hi > > I'm getting started with Cak

Re: Advanced Form, use Form Helper?

2011-02-25 Thread Tilen Majerle
of course u use Form helper and build just divs for datepicker manually, other with form helper :D -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/2/25 Bart Claessens > Hi > > I'm getting started with CakePHP by reading the docs and porting a > previous project to C

Advanced Form, use Form Helper?

2011-02-25 Thread Bart Claessens
Hi I'm getting started with CakePHP by reading the docs and porting a previous project to CakePHP. I've read about the form helper and understood that it's a good helper to create a form quickly. But i'm having trouble to understand the best way to create a more complex for

Re: Cakephp 1.3 Form Helper inputDefaults bug?

2011-02-18 Thread LunarDraco
Just an FYI, I've experienced situations like this where Firebug and the View Source seems so different. Everytime I've seen this I've missed placing a closing tag or forgot to include a required wrapping tag. As an example I had forgot a so my 's were not conained correctly. Not sure which one (f

Re: Cakephp 1.3 Form Helper inputDefaults bug?

2011-02-17 Thread designv...@gmail.com
In case anyone finds this: Here's how to change the error message container: http://book.cakephp.org/view/1401/options-error And an example: Form->create('Artist', array('inputDefaults' =>array('div' => array('tag' => 'p'),'between' => '','error' => array('wrap' => 'span', 'class' => 'bzzz'),'f

Re: Cakephp 1.3 Form Helper inputDefaults bug?

2011-02-17 Thread designv...@gmail.com
So that seems to be the issue lord alone knows why Does anyone know how to change the div to a span for the validation errors? ;-) d//t On Feb 17, 4:32 pm, "designv...@gmail.com" wrote: > Ahh wierd... i was viewing the HTML in Firebug and it was messed up, > actually view source in Firefox

Re: Cakephp 1.3 Form Helper inputDefaults bug?

2011-02-17 Thread designv...@gmail.com
Ahh wierd... i was viewing the HTML in Firebug and it was messed up, actually view source in Firefox and its correct... Hmmm... (and I know I shouldn't be putting divs inside p tags! hehe) On Feb 17, 4:27 pm, Jeremy Burns | Class Outfit wrote: > Could it be browser behaviour because p is a bl

Re: Cakephp 1.3 Form Helper inputDefaults bug?

2011-02-17 Thread Jeremy Burns | Class Outfit
Could it be browser behaviour because p is a block level element? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 17 Feb 2011, at 16:20, designv...@gmail.com wrote: > Hi there, > > When using the 'inputDefaults' option in Form->create and doing the > followi

Cakephp 1.3 Form Helper inputDefaults bug?

2011-02-17 Thread designv...@gmail.com
Hi there, When using the 'inputDefaults' option in Form->create and doing the following: Form->create('Enquiry', array('inputDefaults' => array('div' => array('tag' => 'p'),'between' => '','format' => array('before', 'label', 'error', 'between', 'input', 'after'; ?> Cake seems to close the

Re: Form helper: send default values as named params? --psybear

2010-12-14 Thread euromark
part of if (!empty($this->data)): > > >> >http://www.dereuromark.de/2010/10/07/cakephp-beginner-tips/ > > >> > On 13 Dez., 16:59, psybear83 wrote: > >> >> Hey guys > > >> >> I'm creating a form using the Form helper, and I&#x

Re: Form helper: send default values as named params? --psybear

2010-12-14 Thread Joshua Muheim
;> >> >> >> >> >> >> On Tue, Dec 14, 2010 at 12:19 AM, euromark >> wrote: >> > you should do that in the action >> > in the else part of if (!empty($this->data)): >> >> >http://www.dereuromark.de/2010/10/07/cakephp-

Re: Form helper: send default values as named params? --psybear

2010-12-14 Thread euromark
> > On Tue, Dec 14, 2010 at 12:19 AM, euromark wrote: > > you should do that in the action > > in the else part of if (!empty($this->data)): > > >http://www.dereuromark.de/2010/10/07/cakephp-beginner-tips/ > > > On 13 Dez., 16:59, psybear83 wrote: > >

Re: Form helper: send default values as named params? --psybear

2010-12-13 Thread Joshua Muheim
Dez., 16:59, psybear83 wrote: >> Hey guys >> >> I'm creating a form using the Form helper, and I'd like to send >> default values using named params: >> >> /users/add/first_name:max/last_name:miller >> >> I've already come so far tha

Re: Form helper: send default values as named params? --psybear

2010-12-13 Thread euromark
you should do that in the action in the else part of if (!empty($this->data)): http://www.dereuromark.de/2010/10/07/cakephp-beginner-tips/ On 13 Dez., 16:59, psybear83 wrote: > Hey guys > > I'm creating a form using the Form helper, and I'd like to send > default

Form helper: send default values as named params? --psybear

2010-12-13 Thread psybear83
Hey guys I'm creating a form using the Form helper, and I'd like to send default values using named params: /users/add/first_name:max/last_name:miller I've already come so far that the input() accepts default values for text fields and dropdown lists: echo $this->Form->cr

Re: using Cake's Form helper in non-Cake apps?

2010-12-09 Thread Miles J
7;m looking to migrate part of a Cake project into a non-Cake app. > > Is there a way to use Cake's form helper in a non-Cake environment? Is > there any existing solutions or best practice? > > Thank you. Check out the new CakePHP Questions site http://cakeqs.org and help

using Cake's Form helper in non-Cake apps?

2010-12-08 Thread park
Hi all, I'm looking to migrate part of a Cake project into a non-Cake app. Is there a way to use Cake's form helper in a non-Cake environment? Is there any existing solutions or best practice? Thank you. Check out the new CakePHP Questions site http://cakeqs.org and help others w

Re: dynamically changing the type in form helper

2010-12-03 Thread mochaman
The debug message showed the correct value for the variable $type...it was set to 'text' (no quotes :-)). I downloaded 1.3.5 to double check what I was seeing and here is the same section: case 'text': case 'password': case 'file': $input = $this->{$type}($fieldName, $options); break; I

Re: dynamically changing the type in form helper

2010-12-02 Thread John Andersen
You should never change the core code (my earlier message used code from 1.3.5)! Instead you should debug your own code, to ensure that what you pass on to the core code is correct, that you haven´t shown us yet! Please show the debug messages for the values that you pass on to the core code? Enjoy

Re: dynamically changing the type in form helper

2010-12-01 Thread mochaman
Correction...I shouldn't need to change it to {$type} so I will leave it as is. Please let me know how else I can get this corrected. Thanks again. Erik On Dec 1, 1:02 pm, mochaman wrote: > Yes, that was my first thought as I read that when going through it > which is why I didn't make the cha

Re: dynamically changing the type in form helper

2010-12-01 Thread mochaman
Yes, that was my first thought as I read that when going through it which is why I didn't make the change at first. However, after looking at the core code, it seemed like something was missing in my version (not sure why or how, but it was not there). You are correct...that is what I put using t

Re: dynamically changing the type in form helper

2010-12-01 Thread John Andersen
You should not change anything in the CakePHP core files! What you have added is already there! [core code] case 'text': case 'password': case 'file': $input = $this->{$type}($fieldName, $options); break; [/core code] is the same as your change: [your code] case 'text': $input =

Re: dynamically changing the type in form helper

2010-12-01 Thread mochaman
t; > > Hi, > > > I want to override the input 'type' in my form using the form helper > > but it is not picking up my values.  Here is a snippet: > > > echo $form->input($name,array('type'=>$type1,'label'=>$label)); > > >

Re: dynamically changing the type in form helper

2010-11-30 Thread Amit Badkas
Hi, Are you sure that $type1 is a string? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Wed, Dec 1, 2010 at 7:39 AM, mochaman wrote: > Hi, > > I want to override the input 'type' in my form using the form helper > but it is not picking up my valu

Re: dynamically changing the type in form helper

2010-11-30 Thread John Andersen
What is the value of $type1 when you get the error? Which version of CakePHP are you using? What are the values of the other variables when you get the error? Enjoy, John On 1 Dec., 03:09, mochaman wrote: > Hi, > > I want to override the input 'type' in my form using the f

dynamically changing the type in form helper

2010-11-30 Thread mochaman
Hi, I want to override the input 'type' in my form using the form helper but it is not picking up my values. Here is a snippet: echo $form->input($name,array('type'=>$type1,'label'=>$label)); I set $name, $type1, and $label as a strings read in from

  1   2   3   4   5   >