I have a problem with nicedit in a form textarea not displaying the
db.name.field (i.e. db.page.body)
data that has been previously updated in the form using nicedit and
then submitting.
The data displays after submit, and I can display it on another page
using {{=XML(page.body,sanatize=true}} but when I return to the edit
form the textarea is blank.
Nicedit (or fckeditor as this does same thing) is not getting the
db.page.body even though
in the nicedit configuration I use .setcontent({{=XML
(page.body,sanatize=true}} )
Anyone have this problem before,I thought this would be easy to solve
but haven't been able to get a fix todate.
heres the code:
def edit():
try: thispage=db(db.page.id==request.args[0]).select()
[0]
except: redirect(URL(r=request,f='index'))
form=FORM(DIV(TEXTAREA(_style="width: 98%;",
_name="wikibody1",
_id="wikibody1",_value=XML(thispage.body,sanitize=True))),INPUT
(_type="submit",_value="Save"))
if form.accepts(request.vars,session):
thispage.update_record
(body=form.vars.wikibody1)
response.flash="form accepted!"
elif form.errors:
response.flash="form is invalid!"
return dict(form=form,page=thispage)
Any help appreciated
Chrism
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---