I have the following field definition:

Field('agreedPrice', type='double', default=0.00, 
requires=[IS_FLOAT_IN_RANGE(0,256, dot=',', error_message='Format not of 
type double')], notnull=True, label='Price in euro', writable=False, 
readable=False),

agreedPrice is set in a function:

db.mbs_sub_register.agreedPrice.default = MICRO3PRICE

where MICRO3PRICE = 32

This works fine, except when I disable the field in a custom form:

<div class="form-group">
  <label for="mbs_sub_register.agreedPrice">Prijs p/mnd * </label>
  <input class="form-control" id="disabledInput" type="text" 
placeholder="{{=form.custom.widget.agreedPrice}}" disabled>
</div> <!-- /.form-group -->

This renders:

<input id="disabledInput" class="form-control" type="text" value="32,00" 
name="agreedPrice" form-control="" double="" placeholder="<input class="> " 
disabled>

whereas it should render:

<input id="disabledInput" class="form-control" type="text" disabled="" 
placeholder="32,00">


placeholder="{{=form.custom.widget.agreedPrice}}" works well if the field 
is of type string.


Kind regards,

Annet

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to