Now I've a similar problem. How to make a button that shows a calendar
when you click on it? The reason why I want to do that kind of button
is that each time I try to write a date in the field the calendar pops
up, even though I don't need it. Here is my code again:

dayform = SQLFORM.factory(
        Field('thedate', 'date', label=T(''),
widget=SQLFORM.widgets.date.widget),
         submit_button='Some text')

Thanks in advance for help

On Dec 1, 10:37 pm, Rick <sababa.sab...@gmail.com> wrote:
> Thanks! This is the final code:
> dayform = SQLFORM.factory(
>         Field('thedate', 'date', label=T(''),
> widget=SQLFORM.widgets.date.widget),
>          submit_button='Some text')
>
> On Dec 1, 10:12 pm, Anthony <abasta...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Submit buttons are not in fields, they are added as an input element to an
> > entire form. Where is that Field definition -- in a table definition or
> > SQLFORM.factory? Anyway, SQLFORM takes a 'submit_button' argument, which is
> > the text for the submit button.
>
> > Anthony
>
> > On Thursday, December 1, 2011 3:57:30 PM UTC-5, Rick wrote:
>
> > > Hi,
> > > How to change the text on the submit button in fields? Here'sthe code:
>
> > > Field('thedate', 'date', label=T(''),
> > > widget=SQLFORM.widgets.date.widget))
>
> > > I tried with this, but i didn't work:
> > > Field('thedate', 'date', label=T(''),
> > > submit=INPUT(_type='submit'('Some text')),
> > > widget=SQLFORM.widgets.date.widget))
>
> > > Thanks in advance for help!

Reply via email to