librelist archives

« back to archive

Form widgets

Form widgets

From:
William Martin
Date:
2012-10-03 @ 10:04
Hi,

I write this email to proposal to add form validation[1] attribute to
the html code generated by form widgets.
It's allow the browser to pre validate the form before POST it, and
show warning to the user is the validation failed.
Of course, it's not remove the validation done by the server.

Theses attributes are supported by last Firefox, Chrome, Opera browser.
I don't have test it on IE9/10, but MS try to support most of the
HTML5 spec in the last version of his browser.

Also, we can create a legacy namespace for actual widget, it's will
allow us to use a more simple version of the form renderer.
We can imagine a configuration key to swap between theses two namespace.

To discuss
William

[1] http://www.w3.org/wiki/HTML5_form_additions#Validation

Re: [photon.users] Form widgets

From:
Loic d'Anterroches
Date:
2012-10-03 @ 10:47
Hello,

> I write this email to proposal to add form validation[1] attribute to
> the html code generated by form widgets.
> It's allow the browser to pre validate the form before POST it, and
> show warning to the user is the validation failed.
> Of course, it's not remove the validation done by the server.
> 
> Theses attributes are supported by last Firefox, Chrome, Opera browser.
> I don't have test it on IE9/10, but MS try to support most of the
> HTML5 spec in the last version of his browser.
> 
> Also, we can create a legacy namespace for actual widget, it's will
> allow us to use a more simple version of the form renderer.
> We can imagine a configuration key to swap between theses two namespace.
> 
> [1] http://www.w3.org/wiki/HTML5_form_additions#Validation

From the specs it looks like everything is managed through added
attributes like <input ..... required> if this is just that, I would
prefer that we simply add them. That is, old browsers will simply ignore
these attributes and new ones will enjoy some nice improvements.

loïc

Re: [photon.users] Form widgets

From:
William Martin
Date:
2012-10-03 @ 12:14
For example,

An input of a interger between 2 and 8 is coded like :
<input type="integer" min="2" max="8" />

So, we can integrate most of photon build-in fields validator in these
inputs fields (min, max, pattern), and type of data can be check too
(integer, email, ...)

Loic, if you are agree i will integrate a patch in the master of
photon to add this support.

William


On Wed, Oct 3, 2012 at 12:47 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
> Hello,
>
>> I write this email to proposal to add form validation[1] attribute to
>> the html code generated by form widgets.
>> It's allow the browser to pre validate the form before POST it, and
>> show warning to the user is the validation failed.
>> Of course, it's not remove the validation done by the server.
>>
>> Theses attributes are supported by last Firefox, Chrome, Opera browser.
>> I don't have test it on IE9/10, but MS try to support most of the
>> HTML5 spec in the last version of his browser.
>>
>> Also, we can create a legacy namespace for actual widget, it's will
>> allow us to use a more simple version of the form renderer.
>> We can imagine a configuration key to swap between theses two namespace.
>>
>> [1] http://www.w3.org/wiki/HTML5_form_additions#Validation
>
> From the specs it looks like everything is managed through added
> attributes like <input ..... required> if this is just that, I would
> prefer that we simply add them. That is, old browsers will simply ignore
> these attributes and new ones will enjoy some nice improvements.
>
> loïc



-- 
---------------------------------------------------------
William MARTIN
wysman @NoSpAm@ gmail @DoT@ com

Re: [photon.users] Form widgets

From:
Loic d'Anterroches
Date:
2012-10-03 @ 12:49

On 2012-10-03 14:14, William MARTIN wrote:
> For example,
> 
> An input of a interger between 2 and 8 is coded like :
> <input type="integer" min="2" max="8" />
> 
> So, we can integrate most of photon build-in fields validator in these
> inputs fields (min, max, pattern), and type of data can be check too
> (integer, email, ...)
> 
> Loic, if you are agree i will integrate a patch in the master of
> photon to add this support.

Merge master into develop, then integrate a patch into develop and give
me the link to the commit on projects.ceondo.com for me to do a very
fast review.

It should be fine, but I am interested in the way you are going to
handle this :)

loïc

> 
> On Wed, Oct 3, 2012 at 12:47 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>> Hello,
>>
>>> I write this email to proposal to add form validation[1] attribute to
>>> the html code generated by form widgets.
>>> It's allow the browser to pre validate the form before POST it, and
>>> show warning to the user is the validation failed.
>>> Of course, it's not remove the validation done by the server.
>>>
>>> Theses attributes are supported by last Firefox, Chrome, Opera browser.
>>> I don't have test it on IE9/10, but MS try to support most of the
>>> HTML5 spec in the last version of his browser.
>>>
>>> Also, we can create a legacy namespace for actual widget, it's will
>>> allow us to use a more simple version of the form renderer.
>>> We can imagine a configuration key to swap between theses two namespace.
>>>
>>> [1] http://www.w3.org/wiki/HTML5_form_additions#Validation
>>
>> From the specs it looks like everything is managed through added
>> attributes like <input ..... required> if this is just that, I would
>> prefer that we simply add them. That is, old browsers will simply ignore
>> these attributes and new ones will enjoy some nice improvements.
>>
>> loïc
> 
> 
> 

-- 
Dr Loïc d'Anterroches
Founder Céondo Ltd

w: www.ceondo.com       |  e: loic@ceondo.com
t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124

Céondo Ltd
Dalton House
60 Windsor Avenue
London
SW19 2RR / United Kingdom

Re: [photon.users] Form widgets

From:
William Martin
Date:
2012-10-04 @ 14:50
Hi,

I have push 2 commits for about this thread on the develop branch.

The first one is about input type, and min/max validation.

http://projects.ceondo.com/p/photon/source/commit/732c2b8222b9ae91863721ccf75bfb48236c54aa/

The seconds forward the require propriety of a field to the widget.

http://projects.ceondo.com/p/photon/source/commit/926f54cd4465dbe93d21d1c15923a5bcae57fada/

William

On Wed, Oct 3, 2012 at 2:49 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>
>
> On 2012-10-03 14:14, William MARTIN wrote:
>> For example,
>>
>> An input of a interger between 2 and 8 is coded like :
>> <input type="integer" min="2" max="8" />
>>
>> So, we can integrate most of photon build-in fields validator in these
>> inputs fields (min, max, pattern), and type of data can be check too
>> (integer, email, ...)
>>
>> Loic, if you are agree i will integrate a patch in the master of
>> photon to add this support.
>
> Merge master into develop, then integrate a patch into develop and give
> me the link to the commit on projects.ceondo.com for me to do a very
> fast review.
>
> It should be fine, but I am interested in the way you are going to
> handle this :)
>
> loïc
>
>>
>> On Wed, Oct 3, 2012 at 12:47 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>>> Hello,
>>>
>>>> I write this email to proposal to add form validation[1] attribute to
>>>> the html code generated by form widgets.
>>>> It's allow the browser to pre validate the form before POST it, and
>>>> show warning to the user is the validation failed.
>>>> Of course, it's not remove the validation done by the server.
>>>>
>>>> Theses attributes are supported by last Firefox, Chrome, Opera browser.
>>>> I don't have test it on IE9/10, but MS try to support most of the
>>>> HTML5 spec in the last version of his browser.
>>>>
>>>> Also, we can create a legacy namespace for actual widget, it's will
>>>> allow us to use a more simple version of the form renderer.
>>>> We can imagine a configuration key to swap between theses two namespace.
>>>>
>>>> [1] http://www.w3.org/wiki/HTML5_form_additions#Validation
>>>
>>> From the specs it looks like everything is managed through added
>>> attributes like <input ..... required> if this is just that, I would
>>> prefer that we simply add them. That is, old browsers will simply ignore
>>> these attributes and new ones will enjoy some nice improvements.
>>>
>>> loïc
>>
>>
>>
>
> --
> Dr Loïc d'Anterroches
> Founder Céondo Ltd
>
> w: www.ceondo.com       |  e: loic@ceondo.com
> t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124
>
> Céondo Ltd
> Dalton House
> 60 Windsor Avenue
> London
> SW19 2RR / United Kingdom



-- 
---------------------------------------------------------
William MARTIN
wysman @NoSpAm@ gmail @DoT@ com

Re: [photon.users] Form widgets

From:
Loic d'Anterroches
Date:
2012-10-04 @ 15:40
Hello,

ok, it looks in order. Just a minor cosmetic change:


http://projects.ceondo.com/p/photon/source/commit/3f1ccb5f7f4735e078a8089bf26e5e617aefd230/

line 130: indentation is not good.

You can fix it and merge everything back into master. By the way, if
your PEAR installation is "good" for the unit tests, could you post your
pear list output as a reference? Create a new email with "PEAR packages
to develop with Photon" as a title, this will give us a good reference.

Thanks for the work!
loïc


On 2012-10-04 16:50, William MARTIN wrote:
> Hi,
> 
> I have push 2 commits for about this thread on the develop branch.
> 
> The first one is about input type, and min/max validation.
> 
http://projects.ceondo.com/p/photon/source/commit/732c2b8222b9ae91863721ccf75bfb48236c54aa/
> 
> The seconds forward the require propriety of a field to the widget.
> 
http://projects.ceondo.com/p/photon/source/commit/926f54cd4465dbe93d21d1c15923a5bcae57fada/
> 
> William
> 
> On Wed, Oct 3, 2012 at 2:49 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>>
>>
>> On 2012-10-03 14:14, William MARTIN wrote:
>>> For example,
>>>
>>> An input of a interger between 2 and 8 is coded like :
>>> <input type="integer" min="2" max="8" />
>>>
>>> So, we can integrate most of photon build-in fields validator in these
>>> inputs fields (min, max, pattern), and type of data can be check too
>>> (integer, email, ...)
>>>
>>> Loic, if you are agree i will integrate a patch in the master of
>>> photon to add this support.
>>
>> Merge master into develop, then integrate a patch into develop and give
>> me the link to the commit on projects.ceondo.com for me to do a very
>> fast review.
>>
>> It should be fine, but I am interested in the way you are going to
>> handle this :)
>>
>> loïc
>>
>>>
>>> On Wed, Oct 3, 2012 at 12:47 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>>>> Hello,
>>>>
>>>>> I write this email to proposal to add form validation[1] attribute to
>>>>> the html code generated by form widgets.
>>>>> It's allow the browser to pre validate the form before POST it, and
>>>>> show warning to the user is the validation failed.
>>>>> Of course, it's not remove the validation done by the server.
>>>>>
>>>>> Theses attributes are supported by last Firefox, Chrome, Opera browser.
>>>>> I don't have test it on IE9/10, but MS try to support most of the
>>>>> HTML5 spec in the last version of his browser.
>>>>>
>>>>> Also, we can create a legacy namespace for actual widget, it's will
>>>>> allow us to use a more simple version of the form renderer.
>>>>> We can imagine a configuration key to swap between theses two namespace.
>>>>>
>>>>> [1] http://www.w3.org/wiki/HTML5_form_additions#Validation
>>>>
>>>> From the specs it looks like everything is managed through added
>>>> attributes like <input ..... required> if this is just that, I would
>>>> prefer that we simply add them. That is, old browsers will simply ignore
>>>> these attributes and new ones will enjoy some nice improvements.
>>>>
>>>> loïc
>>>
>>>
>>>
>>
>> --
>> Dr Loïc d'Anterroches
>> Founder Céondo Ltd
>>
>> w: www.ceondo.com       |  e: loic@ceondo.com
>> t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124
>>
>> Céondo Ltd
>> Dalton House
>> 60 Windsor Avenue
>> London
>> SW19 2RR / United Kingdom
> 
> 
> 

-- 
Dr Loïc d'Anterroches
Founder Céondo Ltd

w: www.ceondo.com       |  e: loic@ceondo.com
t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124

Céondo Ltd
Dalton House
60 Windsor Avenue
London
SW19 2RR / United Kingdom

Re: [photon.users] Form widgets

From:
William Martin
Date:
2012-10-04 @ 17:34
Loic,

Thank for quick reply,
I need to commit some stuff before merge it into master, it's common
fields and validator i am using :
- Form Field : URL
- Form Field : IPv4 / IPv6 -> validator already exist
- Form Field : MacAddress -> Validator already exist

William


On Thu, Oct 4, 2012 at 5:40 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
> Hello,
>
> ok, it looks in order. Just a minor cosmetic change:
>
> 
http://projects.ceondo.com/p/photon/source/commit/3f1ccb5f7f4735e078a8089bf26e5e617aefd230/
>
> line 130: indentation is not good.
>
> You can fix it and merge everything back into master. By the way, if
> your PEAR installation is "good" for the unit tests, could you post your
> pear list output as a reference? Create a new email with "PEAR packages
> to develop with Photon" as a title, this will give us a good reference.
>
> Thanks for the work!
> loïc
>
>
> On 2012-10-04 16:50, William MARTIN wrote:
>> Hi,
>>
>> I have push 2 commits for about this thread on the develop branch.
>>
>> The first one is about input type, and min/max validation.
>> 
http://projects.ceondo.com/p/photon/source/commit/732c2b8222b9ae91863721ccf75bfb48236c54aa/
>>
>> The seconds forward the require propriety of a field to the widget.
>> 
http://projects.ceondo.com/p/photon/source/commit/926f54cd4465dbe93d21d1c15923a5bcae57fada/
>>
>> William
>>
>> On Wed, Oct 3, 2012 at 2:49 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>>>
>>>
>>> On 2012-10-03 14:14, William MARTIN wrote:
>>>> For example,
>>>>
>>>> An input of a interger between 2 and 8 is coded like :
>>>> <input type="integer" min="2" max="8" />
>>>>
>>>> So, we can integrate most of photon build-in fields validator in these
>>>> inputs fields (min, max, pattern), and type of data can be check too
>>>> (integer, email, ...)
>>>>
>>>> Loic, if you are agree i will integrate a patch in the master of
>>>> photon to add this support.
>>>
>>> Merge master into develop, then integrate a patch into develop and give
>>> me the link to the commit on projects.ceondo.com for me to do a very
>>> fast review.
>>>
>>> It should be fine, but I am interested in the way you are going to
>>> handle this :)
>>>
>>> loïc
>>>
>>>>
>>>> On Wed, Oct 3, 2012 at 12:47 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>>>>> Hello,
>>>>>
>>>>>> I write this email to proposal to add form validation[1] attribute to
>>>>>> the html code generated by form widgets.
>>>>>> It's allow the browser to pre validate the form before POST it, and
>>>>>> show warning to the user is the validation failed.
>>>>>> Of course, it's not remove the validation done by the server.
>>>>>>
>>>>>> Theses attributes are supported by last Firefox, Chrome, Opera browser.
>>>>>> I don't have test it on IE9/10, but MS try to support most of the
>>>>>> HTML5 spec in the last version of his browser.
>>>>>>
>>>>>> Also, we can create a legacy namespace for actual widget, it's will
>>>>>> allow us to use a more simple version of the form renderer.
>>>>>> We can imagine a configuration key to swap between theses two namespace.
>>>>>>
>>>>>> [1] http://www.w3.org/wiki/HTML5_form_additions#Validation
>>>>>
>>>>> From the specs it looks like everything is managed through added
>>>>> attributes like <input ..... required> if this is just that, I would
>>>>> prefer that we simply add them. That is, old browsers will simply ignore
>>>>> these attributes and new ones will enjoy some nice improvements.
>>>>>
>>>>> loïc
>>>>
>>>>
>>>>
>>>
>>> --
>>> Dr Loïc d'Anterroches
>>> Founder Céondo Ltd
>>>
>>> w: www.ceondo.com       |  e: loic@ceondo.com
>>> t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124
>>>
>>> Céondo Ltd
>>> Dalton House
>>> 60 Windsor Avenue
>>> London
>>> SW19 2RR / United Kingdom
>>
>>
>>
>
> --
> Dr Loïc d'Anterroches
> Founder Céondo Ltd
>
> w: www.ceondo.com       |  e: loic@ceondo.com
> t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124
>
> Céondo Ltd
> Dalton House
> 60 Windsor Avenue
> London
> SW19 2RR / United Kingdom



-- 
---------------------------------------------------------
William MARTIN
wysman @NoSpAm@ gmail @DoT@ com

Re: [photon.users] Form widgets

From:
William Martin
Date:
2012-10-05 @ 09:29
Loic,

I have commit form fields IPv4 / IPv6 / MacAddress

http://projects.ceondo.com/p/photon/source/commit/1cd67d725a91fa6f8968416878f06bb14cad395c/

I have create a CONTRIBUTOR and NEWS files too.
If it's sound good for you, you can merge it into master.

William

On Thu, Oct 4, 2012 at 7:34 PM, William MARTIN <wysman@gmail.com> wrote:
> Loic,
>
> Thank for quick reply,
> I need to commit some stuff before merge it into master, it's common
> fields and validator i am using :
> - Form Field : URL
> - Form Field : IPv4 / IPv6 -> validator already exist
> - Form Field : MacAddress -> Validator already exist
>
> William
>
>
> On Thu, Oct 4, 2012 at 5:40 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>> Hello,
>>
>> ok, it looks in order. Just a minor cosmetic change:
>>
>> 
http://projects.ceondo.com/p/photon/source/commit/3f1ccb5f7f4735e078a8089bf26e5e617aefd230/
>>
>> line 130: indentation is not good.
>>
>> You can fix it and merge everything back into master. By the way, if
>> your PEAR installation is "good" for the unit tests, could you post your
>> pear list output as a reference? Create a new email with "PEAR packages
>> to develop with Photon" as a title, this will give us a good reference.
>>
>> Thanks for the work!
>> loïc
>>
>>
>> On 2012-10-04 16:50, William MARTIN wrote:
>>> Hi,
>>>
>>> I have push 2 commits for about this thread on the develop branch.
>>>
>>> The first one is about input type, and min/max validation.
>>> 
http://projects.ceondo.com/p/photon/source/commit/732c2b8222b9ae91863721ccf75bfb48236c54aa/
>>>
>>> The seconds forward the require propriety of a field to the widget.
>>> 
http://projects.ceondo.com/p/photon/source/commit/926f54cd4465dbe93d21d1c15923a5bcae57fada/
>>>
>>> William
>>>
>>> On Wed, Oct 3, 2012 at 2:49 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>>>>
>>>>
>>>> On 2012-10-03 14:14, William MARTIN wrote:
>>>>> For example,
>>>>>
>>>>> An input of a interger between 2 and 8 is coded like :
>>>>> <input type="integer" min="2" max="8" />
>>>>>
>>>>> So, we can integrate most of photon build-in fields validator in these
>>>>> inputs fields (min, max, pattern), and type of data can be check too
>>>>> (integer, email, ...)
>>>>>
>>>>> Loic, if you are agree i will integrate a patch in the master of
>>>>> photon to add this support.
>>>>
>>>> Merge master into develop, then integrate a patch into develop and give
>>>> me the link to the commit on projects.ceondo.com for me to do a very
>>>> fast review.
>>>>
>>>> It should be fine, but I am interested in the way you are going to
>>>> handle this :)
>>>>
>>>> loïc
>>>>
>>>>>
>>>>> On Wed, Oct 3, 2012 at 12:47 PM, Loic d'Anterroches <loic@ceondo.com> wrote:
>>>>>> Hello,
>>>>>>
>>>>>>> I write this email to proposal to add form validation[1] attribute to
>>>>>>> the html code generated by form widgets.
>>>>>>> It's allow the browser to pre validate the form before POST it, and
>>>>>>> show warning to the user is the validation failed.
>>>>>>> Of course, it's not remove the validation done by the server.
>>>>>>>
>>>>>>> Theses attributes are supported by last Firefox, Chrome, Opera browser.
>>>>>>> I don't have test it on IE9/10, but MS try to support most of the
>>>>>>> HTML5 spec in the last version of his browser.
>>>>>>>
>>>>>>> Also, we can create a legacy namespace for actual widget, it's will
>>>>>>> allow us to use a more simple version of the form renderer.
>>>>>>> We can imagine a configuration key to swap between theses two namespace.
>>>>>>>
>>>>>>> [1] http://www.w3.org/wiki/HTML5_form_additions#Validation
>>>>>>
>>>>>> From the specs it looks like everything is managed through added
>>>>>> attributes like <input ..... required> if this is just that, I would
>>>>>> prefer that we simply add them. That is, old browsers will simply ignore
>>>>>> these attributes and new ones will enjoy some nice improvements.
>>>>>>
>>>>>> loïc
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Dr Loïc d'Anterroches
>>>> Founder Céondo Ltd
>>>>
>>>> w: www.ceondo.com       |  e: loic@ceondo.com
>>>> t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124
>>>>
>>>> Céondo Ltd
>>>> Dalton House
>>>> 60 Windsor Avenue
>>>> London
>>>> SW19 2RR / United Kingdom
>>>
>>>
>>>
>>
>> --
>> Dr Loïc d'Anterroches
>> Founder Céondo Ltd
>>
>> w: www.ceondo.com       |  e: loic@ceondo.com
>> t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124
>>
>> Céondo Ltd
>> Dalton House
>> 60 Windsor Avenue
>> London
>> SW19 2RR / United Kingdom
>
>
>
> --
> ---------------------------------------------------------
> William MARTIN
> wysman @NoSpAm@ gmail @DoT@ com



-- 
---------------------------------------------------------
William MARTIN
wysman @NoSpAm@ gmail @DoT@ com