i dont quite follow.  Here is my code

    mtgdb.define_table(
    'thoughts',
    Field('description','text'),
    Field('author','string'),
    Field('votes','integer')
    )

    ideaform = SQLFORM(mtgdb.thoughts, fields=['description'],
submit_button='Post', formstyle='divs')
    if ideaform.accepts(request.vars, session):
        response.flash = 'form accepted'
    elif ideaform.errors:
        response.flash = 'form has errors'
    else:
        response.flash = 'please fill out the form'

it creates a form that takes up approximately  3" of the avialiabe
real estate.  Because teh description field is of type text and teh
"Post" button is underneath it.  What I want is something like this:

+---------------------------------------------------------------------------------------------------------------------------------------
+
|
|        POST
+---------------------------------------------------------------------------------------------------------------------------------------
+

I found a post with custom widgets and something even more complex
with the formstyle stuff, but have to believe there is a simpler way.

On Aug 7, 12:39 pm, mdipierro <[email protected]> wrote:
> {{if form.errors:}}
>  error are {{=form.errors}}
> {{pass}}
> {{=form.custom.begin}}
> {{=form.custom.submit}}
> <input name="yourfield"/> <!-- place your fields as you like //-->
> {{=form.custom.end}}
>
> On Aug 7, 11:34 am, "david.waldrop" <[email protected]> wrote:
>
>
>
> > I am having trouble controlling the visual aspects fo a SQLFORM.  More
> > specifically, I want to enable a text box and a POST button on the top
> > of the screen and have a lsit display below it.  The list is gonna be
> > quite large so I do not want the default 2" text box and the button
> > below it, but rather a single line of input (that can accept any
> > mnumber of characters) and the POST button right beside it
> > vertically.  I played around with the formstyles, but there is not
> > very good examples.  Any suggestion/examples would be appreciated?

Reply via email to