I guess you have to replace crud.select with db.select

Crud returns a form using tables by default unless you specify formstyle
parameter.

In your case. You probably need only data as a value. So use db.select not
crud.select

http://zerp.ly/rochacbruno
Em 06/08/2011 23:45, "Hybride" <mshybr...@gmail.com> escreveu:
> Hi everyone, am not sure if this intentional, but I've found something
> curious (forgive me, if a repeat): when doing a crud.select for one
> field in my controller, and putting it in a form's textarea, the
> select is transformed into a table; however, if I simply print out the
> result, I get it without a format.
>
> data = crud.select(db.t_problems,
> db.t_problems.id==db.t_problems(request.args(0)),
> fields=['f_skeleton'], headers={'f_skeleton':''})
> form = FORM(TEXTAREA(_id='problem_code',_name='solution',
> value=data),
> INPUT(_type='submit'), _action='')
>
> My result:
>
> <textarea><table><thead><tr><th></th></tr></thead><tbody><tr
> class="even"><td>def hello():</td></tr></tbody></table></textarea>
>
> If I do the print as such,
> form = FORM(P(data),TEXTAREA(_id='problem_code',_name='solution',
> value=''),
> INPUT(_type='submit'), _action='')
>
> My result (as it should be):
> def hello():
>
> Any idea as to why/how to get around this?

Reply via email to