Thank you again for your quick response! I commented out the line and I can now submit E notation values like "1e-06" which is excellent. After testing I noticed that if you return to see the update form again the field will show value "1e-06.00" and if you press submit it will produce a warning for the ".00" part. Is there an easy way around this one also?
- Kimmo On 5 maalis, 14:22, Massimo Di Pierro <[email protected]> wrote: > Actually I think the problem is simply the JS validator. Try comment this > line in static/js/web2py.js > > doc.on('keyup', 'input.double, input.decimal', > function(){this.value=this.value.reverse().replace(/[^0-9\-\.,]|[\-](?=.)|[\.,](?=[0-9]*[\.,])/g,'').reverse();}); > > > > > > > > On Monday, 5 March 2012 05:25:39 UTC-6, Manuele wrote: > > > Il 05/03/2012 11:18, Kimmo ha scritto: > > > Hi, > > > > I have an update SQLFORM for db record which includes double type > > > fields. I noticed that the form does not permit values for example > > > "1e6". Letter "e" is automatically removed when it's typed in. > > > Behaviour is understandable but is there a way to get scientific > > > notation support for double fields? > > > > One solution would be to use strings instead of double type fields but > > > i really would like to avoid this. > > > maybe you need to write a custom widget... > > > M. > > > > Best regards > > > - Kimmo

