form.element(_id='...')['_placeholder']='...'
feels right to have this data in the view but I can see the advantage
of 'declare once' in the model.
I agree Anthony, a solution could be baked into web2py as 'label'
already has been. html5 is here and adoption is pretty good thanks in
large part to webkit.
I agree Anthony, a solution could be baked into web2py as 'label'
already has been. html5 is here and adoption is pretty good thanks in
large part to webkit.
{{form.custom.widget.tm_home["_placeholder"] = "Home Team Name"}}
{{=form.custom.widget.tm_home}}
--
---
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
def autoset_form_placeholders(form, form_labels=False, form_comments=False): for f in form.fields: if f == 'id': pass else: form.custom.widget[f].update(_placeholder=f) if not form_labels: form.elements('.w2p_fl', replace=None) if not form_comments: form.elements('.w2p_fc', replace=None)