works with the following in controller: 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=thispage.body)),INPUT (_type="submit",_value="Save")) if form.accepts(request.vars,session): thispage.update_record (body=form.vars.wikibody1) response.flash="form accepted!" else: response.flash="form is invalid!" return dict(form=form,page=thispage)
BUT I'm having trouble as the Nicedit representation does not show on refresh, I can show it on a non nicedit view using {{=XML(page.body,sanitize=True)}} in HTML but not sure what to add in above controller to allow the same functionality?? Also the response.flash="form is invalid!" code runs when I load the above edit view, that must mean it is submitting form on page load, which I do not want! I would like to add that I would be keen to offer my services to Document this little journey of discovery for others :) 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 web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---