amitmodak89 / magento-w2p

Automatically exported from code.google.com/p/magento-w2p
0 stars 0 forks source link

Field constraints #498

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A customer reports field constrains do not work in mage. 
E.g. max field length, min field length. 

Can you run a quick test to validate?

Original issue reported on code.google.com by zetapri...@gmail.com on 29 Mar 2011 at 2:25

GoogleCodeExporter commented 8 years ago
Max field length constrain was implemented by native html feature. But min 
constrain is not implemented :-(

Original comment by Anatoly....@gmail.com on 29 Mar 2011 at 5:36

GoogleCodeExporter commented 8 years ago
I see no constraints at all. Tested on /mageimage/
web_to_print_store_incl_theme   1.8.4.0beta3 (beta) 

This template 
http://cname.zetaprints.com/?page=template;TemplateID=6443E134-4CD1-4D33-841D-16
36502671A4
has a min constrain of 5 characters for the first text field and a max value of 
10 for the second one. Both work either way:
http://ec2-174-129-95-130.compute-1.amazonaws.com/mageimage/index.php/magentot-0
1/1pg-template.html

Original comment by agur...@gmail.com on 29 Mar 2011 at 6:16

GoogleCodeExporter commented 8 years ago
Can you post the XML for the template here?
http://cname.zetaprints.com/?page=template-xml;TemplateID=6443E134-4CD1-4D33-841
D-1636502671A4

The fields are text areas. HTML has no maxlen for them, but I'm not sure we 
output maxlen for them at all.

Original comment by zetapri...@gmail.com on 29 Mar 2011 at 9:01

GoogleCodeExporter commented 8 years ago
Add a JS to constrain input len on type='text' and textarea.

If the user input falls outside the range display a hint depending on presence 
of min/max:
* "Enter between X and Y letters"
* "Enter more than X letters"
* "Enter less than Y letters"

Do not let them enter more than what is allowed, but do allow enter less.
Quite often these constraints are more of a hindrance than help.

Original comment by zetapri...@gmail.com on 30 Mar 2011 at 6:50

GoogleCodeExporter commented 8 years ago

Original comment by ad...@zetaprints.com on 18 Apr 2011 at 9:09

GoogleCodeExporter commented 8 years ago

Original comment by ad...@zetaprints.com on 7 Jun 2011 at 10:13

GoogleCodeExporter commented 8 years ago
Few questions.
1. Where do you get required constraints from?
2. If such constraints are present, how strongly to enforce them? Should form 
submitting be allowed if minimum is not met? Should we do server side 
validation too?

Original comment by jamb...@gmail.com on 16 Jun 2011 at 7:44

GoogleCodeExporter commented 8 years ago
Good point.
Let's limit it to warnings on the client side.

Original comment by ad...@zetaprints.com on 16 Jun 2011 at 9:22

GoogleCodeExporter commented 8 years ago
Good. Is form generated every time dynamically? Is this done via xslt? Where 
exactly this happens?

Original comment by jamb...@gmail.com on 16 Jun 2011 at 9:35

GoogleCodeExporter commented 8 years ago

Original comment by ad...@zetaprints.com on 16 Jun 2011 at 6:37

GoogleCodeExporter commented 8 years ago
Field constraints also need to be visible for in-preview editor. Mockup 
D5-7.png here
http://code.google.com/p/magento-w2p/issues/detail?id=564#c2

Original comment by agur...@gmail.com on 6 Jul 2011 at 7:19

GoogleCodeExporter commented 8 years ago

Original comment by ad...@zetaprints.com on 17 Feb 2012 at 12:14