Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-10 Thread Lorne Dudley
Hi Mark !

OK, I have burned up enough time up on this.   It is not clear to me 
whether I am dealing with a plugin or a helper.  I did read up on 
Configure:: though, and that knowledge will be useful.  I got as far as 
tracing entry to your FormHelper, followed by entry to the cakePHP 
FormHelper, but the functions within your FormHelper never get called.  
Examination of your code suggests that the cakePHP helper should be calling 
functions within your helper ???  The FormConfig.novalidate value is 
visible globally though.  I have been unsuccessful in finding examples of 
similar installations and I have not seen any examples that extend native 
cakePHP code as yours seems to do in the documentation.

But the learning experience has been useful.

Regards

Lorne

On Friday, January 9, 2015 at 7:18:01 PM UTC-5, Lorne Dudley wrote:
>
> OK, I see this in your FormHelper.php version #L44
>
> use Cake\View\Helper\FormHelper as CakeFormHelper;
> class FormHelper extends CakeFormHelper
>
> So to answer my last question, it would appear that your FormHelper adds 
> the ability to inspect
> the "novalidate" option.
>
> Now I have to determine how to invoke your FormHelper.
>
> Regards
>
> Lorne
>
> On Friday, January 9, 2015 at 5:39:29 PM UTC-5, Lorne Dudley wrote:
>>
>> OK Mark !
>>
>> I am into the Configuration documentation and looking at bootstrap.php 
>> now.  I will attempt to get this loaded by myself.
>>
>> Can you answer two questions though ?  ( guess that is really three :-)  )
>>
>> Should I focus on your #L44 version ?
>>
>> If I get this working, does your FormHelper.php completely replace the 
>> function in /vendor/cakephp/cakephp/src/View/Helper/FormHelper.php ?
>>
>> Regards
>>
>> Lorne
>>
>> On Friday, January 9, 2015 at 2:45:21 PM UTC-5, euromark wrote:
>>>
>>> Lorne
>>> you can actually set a config on the user side when using sth similar I 
>>> did in my plugin (since 2.x).
>>>
>>> You can either use my Tools plugin directly, or copy and paste the 
>>> relevant part:
>>>
>>> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L16
>>>
>>> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L44
>>>
>>> You can disable it globally or locally via
>>> Configure::write('FormConfig.novalidate', 'true');
>>>
>>> then :)
>>>
>>> No need to mess with any templates in this case.
>>> Mark
>>>
>>>
>>> Am Freitag, 9. Januar 2015 17:50:54 UTC+1 schrieb Lorne Dudley:

 Hello José

 Thanks for the reference.  If I interpret the manual properly, I think 
 it wants me to store the custom widget under the 
 /vendor/cakephp/cakephp/src/View/Widget/ directory structure  ?  

 If this is correct then would the custom widget be wiped out every time 
 I did a "composer update" ? 

  I found this to be the case when I had managed to default the form 
 submission to "formnovalidate " using a different technique under the 
 /vendor structure. 

  In the FormHelper.php function widget() I added the line 
 unset($data['required']); // turn off HTML5 browser validation 
 after the line
 unset($data['secure']);

 This was replace to the original (or updated) version when I did the 
 "composer update".

 What I was really hoping for was perhaps a method of setting a /config 
 option on the user side.

 Regards

 Lorne

 On Thursday, January 8, 2015 at 11:28:48 PM UTC-5, Lorne Dudley wrote:
>
> I have finally found the method to turn off browser validation so that 
> cakePHP can take control of the validation instead.  
>   
> This works for me.  
>   
> Form->button(__('Submit'), array('formnovalidate' => 
> true)) ?>  
>   
> Rather than do this for every Form, is there any way to set this 
> option for Forms globally on the user side ?  
>   
> Regards
>


-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread Lorne Dudley
OK, I see this in your FormHelper.php version #L44

use Cake\View\Helper\FormHelper as CakeFormHelper;
class FormHelper extends CakeFormHelper

So to answer my last question, it would appear that your FormHelper adds 
the ability to inspect
the "novalidate" option.

Now I have to determine how to invoke your FormHelper.

Regards

Lorne

On Friday, January 9, 2015 at 5:39:29 PM UTC-5, Lorne Dudley wrote:
>
> OK Mark !
>
> I am into the Configuration documentation and looking at bootstrap.php 
> now.  I will attempt to get this loaded by myself.
>
> Can you answer two questions though ?  ( guess that is really three :-)  )
>
> Should I focus on your #L44 version ?
>
> If I get this working, does your FormHelper.php completely replace the 
> function in /vendor/cakephp/cakephp/src/View/Helper/FormHelper.php ?
>
> Regards
>
> Lorne
>
> On Friday, January 9, 2015 at 2:45:21 PM UTC-5, euromark wrote:
>>
>> Lorne
>> you can actually set a config on the user side when using sth similar I 
>> did in my plugin (since 2.x).
>>
>> You can either use my Tools plugin directly, or copy and paste the 
>> relevant part:
>>
>> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L16
>>
>> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L44
>>
>> You can disable it globally or locally via
>> Configure::write('FormConfig.novalidate', 'true');
>>
>> then :)
>>
>> No need to mess with any templates in this case.
>> Mark
>>
>>
>> Am Freitag, 9. Januar 2015 17:50:54 UTC+1 schrieb Lorne Dudley:
>>>
>>> Hello José
>>>
>>> Thanks for the reference.  If I interpret the manual properly, I think 
>>> it wants me to store the custom widget under the 
>>> /vendor/cakephp/cakephp/src/View/Widget/ directory structure  ?  
>>>
>>> If this is correct then would the custom widget be wiped out every time 
>>> I did a "composer update" ? 
>>>
>>>  I found this to be the case when I had managed to default the form 
>>> submission to "formnovalidate " using a different technique under the 
>>> /vendor structure. 
>>>
>>>  In the FormHelper.php function widget() I added the line 
>>> unset($data['required']); // turn off HTML5 browser validation 
>>> after the line
>>> unset($data['secure']);
>>>
>>> This was replace to the original (or updated) version when I did the 
>>> "composer update".
>>>
>>> What I was really hoping for was perhaps a method of setting a /config 
>>> option on the user side.
>>>
>>> Regards
>>>
>>> Lorne
>>>
>>> On Thursday, January 8, 2015 at 11:28:48 PM UTC-5, Lorne Dudley wrote:

 I have finally found the method to turn off browser validation so that 
 cakePHP can take control of the validation instead.  
   
 This works for me.  
   
 Form->button(__('Submit'), array('formnovalidate' => 
 true)) ?>  
   
 Rather than do this for every Form, is there any way to set this option 
 for Forms globally on the user side ?  
   
 Regards

>>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread Lorne Dudley
OK Mark !

I am into the Configuration documentation and looking at bootstrap.php 
now.  I will attempt to get this loaded by myself.

Can you answer two questions though ?  ( guess that is really three :-)  )

Should I focus on your #L44 version ?

If I get this working, does your FormHelper.php completely replace the 
function in /vendor/cakephp/cakephp/src/View/Helper/FormHelper.php ?

Regards

Lorne

On Friday, January 9, 2015 at 2:45:21 PM UTC-5, euromark wrote:
>
> Lorne
> you can actually set a config on the user side when using sth similar I 
> did in my plugin (since 2.x).
>
> You can either use my Tools plugin directly, or copy and paste the 
> relevant part:
>
> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L16
>
> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L44
>
> You can disable it globally or locally via
> Configure::write('FormConfig.novalidate', 'true');
>
> then :)
>
> No need to mess with any templates in this case.
> Mark
>
>
> Am Freitag, 9. Januar 2015 17:50:54 UTC+1 schrieb Lorne Dudley:
>>
>> Hello José
>>
>> Thanks for the reference.  If I interpret the manual properly, I think it 
>> wants me to store the custom widget under the 
>> /vendor/cakephp/cakephp/src/View/Widget/ directory structure  ?  
>>
>> If this is correct then would the custom widget be wiped out every time I 
>> did a "composer update" ? 
>>
>>  I found this to be the case when I had managed to default the form 
>> submission to "formnovalidate " using a different technique under the 
>> /vendor structure. 
>>
>>  In the FormHelper.php function widget() I added the line 
>> unset($data['required']); // turn off HTML5 browser validation 
>> after the line
>> unset($data['secure']);
>>
>> This was replace to the original (or updated) version when I did the 
>> "composer update".
>>
>> What I was really hoping for was perhaps a method of setting a /config 
>> option on the user side.
>>
>> Regards
>>
>> Lorne
>>
>> On Thursday, January 8, 2015 at 11:28:48 PM UTC-5, Lorne Dudley wrote:
>>>
>>> I have finally found the method to turn off browser validation so that 
>>> cakePHP can take control of the validation instead.  
>>>   
>>> This works for me.  
>>>   
>>> Form->button(__('Submit'), array('formnovalidate' => 
>>> true)) ?>  
>>>   
>>> Rather than do this for every Form, is there any way to set this option 
>>> for Forms globally on the user side ?  
>>>   
>>> Regards
>>>
>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread euromark
Never mind my solution then. It would need a little bit more knowledge of 
how CakePHP works.
Even though it would exactly do what you want to.

Try to read the wiki documentation and study the plugin code more, that 
might clarify it a bit.
But note that this is an extended FormHelper, not the core one.


Am Freitag, 9. Januar 2015 22:11:03 UTC+1 schrieb Lorne Dudley:
>
> Hello Mark !
>
> Thanks for this.  At first glance I do not see any difference between the 
> #L16 and the #L44 version.
>
> I have loaded the #L44 version as /src/View/Helper/FornHelper.php.
>
> I do not know where to place
> Configure::write('FormConfig.novalidate', 'true');
>
> I'm a cakePHP novice. Can you give me more detailed instruction ?
> What I would like to achieve is to have the "novalidate" active for any 
> forms that might appear in the application.
>
> How and where do I set up "Configure::write('FormConfig.novalidate', 
> 'true');" so that it is called only on start-up ?
>
> Regards
>
> Lorne
>
> On Friday, January 9, 2015 at 2:45:21 PM UTC-5, euromark wrote:
>>
>> Lorne
>> you can actually set a config on the user side when using sth similar I 
>> did in my plugin (since 2.x).
>>
>> You can either use my Tools plugin directly, or copy and paste the 
>> relevant part:
>>
>> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L16
>>
>> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L44
>>
>> You can disable it globally or locally via
>> Configure::write('FormConfig.novalidate', 'true');
>>
>> then :)
>>
>> No need to mess with any templates in this case.
>> Mark
>>
>>
>> Am Freitag, 9. Januar 2015 17:50:54 UTC+1 schrieb Lorne Dudley:
>>>
>>> Hello José
>>>
>>> Thanks for the reference.  If I interpret the manual properly, I think 
>>> it wants me to store the custom widget under the 
>>> /vendor/cakephp/cakephp/src/View/Widget/ directory structure  ?  
>>>
>>> If this is correct then would the custom widget be wiped out every time 
>>> I did a "composer update" ? 
>>>
>>>  I found this to be the case when I had managed to default the form 
>>> submission to "formnovalidate " using a different technique under the 
>>> /vendor structure. 
>>>
>>>  In the FormHelper.php function widget() I added the line 
>>> unset($data['required']); // turn off HTML5 browser validation 
>>> after the line
>>> unset($data['secure']);
>>>
>>> This was replace to the original (or updated) version when I did the 
>>> "composer update".
>>>
>>> What I was really hoping for was perhaps a method of setting a /config 
>>> option on the user side.
>>>
>>> Regards
>>>
>>> Lorne
>>>
>>> On Thursday, January 8, 2015 at 11:28:48 PM UTC-5, Lorne Dudley wrote:

 I have finally found the method to turn off browser validation so that 
 cakePHP can take control of the validation instead.  
   
 This works for me.  
   
 Form->button(__('Submit'), array('formnovalidate' => 
 true)) ?>  
   
 Rather than do this for every Form, is there any way to set this option 
 for Forms globally on the user side ?  
   
 Regards

>>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread Lorne Dudley
Hello Mark !

Thanks for this.  At first glance I do not see any difference between the 
#L16 and the #L44 version.

I have loaded the #L44 version as /src/View/Helper/FornHelper.php.

I do not know where to place
Configure::write('FormConfig.novalidate', 'true');

I'm a cakePHP novice. Can you give me more detailed instruction ?
What I would like to achieve is to have the "novalidate" active for any 
forms that might appear in the application.

How and where do I set up "Configure::write('FormConfig.novalidate', 'true'
);" so that it is called only on start-up ?

Regards

Lorne

On Friday, January 9, 2015 at 2:45:21 PM UTC-5, euromark wrote:
>
> Lorne
> you can actually set a config on the user side when using sth similar I 
> did in my plugin (since 2.x).
>
> You can either use my Tools plugin directly, or copy and paste the 
> relevant part:
>
> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L16
>
> https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L44
>
> You can disable it globally or locally via
> Configure::write('FormConfig.novalidate', 'true');
>
> then :)
>
> No need to mess with any templates in this case.
> Mark
>
>
> Am Freitag, 9. Januar 2015 17:50:54 UTC+1 schrieb Lorne Dudley:
>>
>> Hello José
>>
>> Thanks for the reference.  If I interpret the manual properly, I think it 
>> wants me to store the custom widget under the 
>> /vendor/cakephp/cakephp/src/View/Widget/ directory structure  ?  
>>
>> If this is correct then would the custom widget be wiped out every time I 
>> did a "composer update" ? 
>>
>>  I found this to be the case when I had managed to default the form 
>> submission to "formnovalidate " using a different technique under the 
>> /vendor structure. 
>>
>>  In the FormHelper.php function widget() I added the line 
>> unset($data['required']); // turn off HTML5 browser validation 
>> after the line
>> unset($data['secure']);
>>
>> This was replace to the original (or updated) version when I did the 
>> "composer update".
>>
>> What I was really hoping for was perhaps a method of setting a /config 
>> option on the user side.
>>
>> Regards
>>
>> Lorne
>>
>> On Thursday, January 8, 2015 at 11:28:48 PM UTC-5, Lorne Dudley wrote:
>>>
>>> I have finally found the method to turn off browser validation so that 
>>> cakePHP can take control of the validation instead.  
>>>   
>>> This works for me.  
>>>   
>>> Form->button(__('Submit'), array('formnovalidate' => 
>>> true)) ?>  
>>>   
>>> Rather than do this for every Form, is there any way to set this option 
>>> for Forms globally on the user side ?  
>>>   
>>> Regards
>>>
>>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread euromark
Lorne
you can actually set a config on the user side when using sth similar I did 
in my plugin (since 2.x).

You can either use my Tools plugin directly, or copy and paste the relevant 
part:
https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L16
https://github.com/dereuromark/cakephp-tools/blob/cake3/src/View/Helper/FormHelper.php#L44

You can disable it globally or locally via
Configure::write('FormConfig.novalidate', 'true');

then :)

No need to mess with any templates in this case.
Mark


Am Freitag, 9. Januar 2015 17:50:54 UTC+1 schrieb Lorne Dudley:
>
> Hello José
>
> Thanks for the reference.  If I interpret the manual properly, I think it 
> wants me to store the custom widget under the 
> /vendor/cakephp/cakephp/src/View/Widget/ directory structure  ?  
>
> If this is correct then would the custom widget be wiped out every time I 
> did a "composer update" ? 
>
>  I found this to be the case when I had managed to default the form 
> submission to "formnovalidate " using a different technique under the 
> /vendor structure. 
>
>  In the FormHelper.php function widget() I added the line 
> unset($data['required']); // turn off HTML5 browser validation 
> after the line
> unset($data['secure']);
>
> This was replace to the original (or updated) version when I did the 
> "composer update".
>
> What I was really hoping for was perhaps a method of setting a /config 
> option on the user side.
>
> Regards
>
> Lorne
>
> On Thursday, January 8, 2015 at 11:28:48 PM UTC-5, Lorne Dudley wrote:
>>
>> I have finally found the method to turn off browser validation so that 
>> cakePHP can take control of the validation instead.  
>>   
>> This works for me.  
>>   
>> Form->button(__('Submit'), array('formnovalidate' => 
>> true)) ?>  
>>   
>> Rather than do this for every Form, is there any way to set this option 
>> for Forms globally on the user side ?  
>>   
>> Regards
>>
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread Lorne Dudley
Hello José

Thanks for the reference.  If I interpret the manual properly, I think it 
wants me to store the custom widget under the 
/vendor/cakephp/cakephp/src/View/Widget/ directory structure  ?  

If this is correct then would the custom widget be wiped out every time I 
did a "composer update" ? 

 I found this to be the case when I had managed to default the form 
submission to "formnovalidate " using a different technique under the 
/vendor structure. 

 In the FormHelper.php function widget() I added the line 
unset($data['required']); // turn off HTML5 browser validation 
after the line
unset($data['secure']);

This was replace to the original (or updated) version when I did the 
"composer update".

What I was really hoping for was perhaps a method of setting a /config 
option on the user side.

Regards

Lorne

On Thursday, January 8, 2015 at 11:28:48 PM UTC-5, Lorne Dudley wrote:
>
> I have finally found the method to turn off browser validation so that 
> cakePHP can take control of the validation instead.  
>   
> This works for me.  
>   
> Form->button(__('Submit'), array('formnovalidate' => true)) 
> ?>  
>   
> Rather than do this for every Form, is there any way to set this option 
> for Forms globally on the user side ?  
>   
> Regards
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-09 Thread José Lorenzo
In cake 3 you can override the ButtonWidget and make that a default 
property of your 
buttons: 
http://book.cakephp.org/3.0/en/views/helpers/form.html#adding-custom-widgets

You can just extend the one in the core (Cake\View\Widget\ButtonWidget) and 
append your custom options.

On Friday, January 9, 2015 at 5:28:48 AM UTC+1, Lorne Dudley wrote:
>
> I have finally found the method to turn off browser validation so that 
> cakePHP can take control of the validation instead.  
>   
> This works for me.  
>   
> Form->button(__('Submit'), array('formnovalidate' => true)) 
> ?>  
>   
> Rather than do this for every Form, is there any way to set this option 
> for Forms globally on the user side ?  
>   
> Regards
>

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


cakePHP 3.0-RC1, turning off HTML5 browser validation globally on user side ???

2015-01-08 Thread Lorne Dudley
I have finally found the method to turn off browser validation so that 
cakePHP can take control of the validation instead.  
  
This works for me.  
  
Form->button(__('Submit'), array('formnovalidate' => true)) 
?>  
  
Rather than do this for every Form, is there any way to set this option for 
Forms globally on the user side ?  
  
Regards

-- 
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.