Both methods work flawlessly as figured. Thanks a bunch!
On Tuesday, October 29, 2013 3:38:45 AM UTC, pip wrote:
>
> Since you can't have hyphens in python variable names, how do we pass
> attributes containing hyphens to a form?
>
> Example:
>
>
> form.Textbox("username", form.regexp("^[A-Za-z0-9]*$", 'Username must
> contain only letters and numbers'), description="Username",
> data-attribute="required")
>
> That would fail with
> keyword can't be an expression
> Because of the way Python works.
>
> So, how would we get around this? I *need *in order to have my app
> functioning on the front-end, nothing I can do about it.
>
> Please say there's a way around this. Ideas that come to mind including
> logic on the template to convert _ to - and then pass it data_attribute or
> something? Idk.
>
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.