You have two forms but you did not name them form.accept(...,formname="...")
Try do it. It may solve the problem. On Jul 16, 4:16 pm, murray3 <[email protected]> wrote: > Any help with this would be great as I am stuck and cannot get it to > work :( > I had FCKeditor working as wiki editor I was able to open and save > fields > to the db without any problems. > I moved the app code to the jpolite framework and now when I edit a > field it does not > update the database. > The form_main_tab , which uses FORM(), is where the problem seems to > be. > I am using sqlform in another part of my app also within jpolite and > it uPdates the db without problem. > If anyone could just look at to see if there is anything obvious in > the FORM definition of form_main_tab. > thanks > Chrism > > > In controller: > > def m203(): > > try: thisprodj_id=db(db.prodj.id==request.args[0]).select()[0] > > except: redirect(URL(r=request,f='index')) > > form_maintab=FORM(DIV(TEXTAREA(_style="width: 98%;", > > _name="form_main_tab", _id="form_main_tab",value=XML > > (thisprodj_id.main_tab))),INPUT > > (_type="submit",_value="Save"),_class='ajaxform1') # ,sanitize=True > > does not show images in form? > > if form_maintab.accepts(request.vars,session,keepvalues=True): > > thisprodj_id.update_record # updates record - not woking in > > jpolite? > > (main_tab=form_maintab.vars.form_main_tab) > > response.flash="form accepted!" > > elif form_maintab.errors: > > response.flash="form is invalid!" > > form_wikitab0=FORM(DIV(TEXTAREA(_style="width: 98%;", > > _name="form_wiki_tab0", _id="form_wiki_tab0",value=XML > > (thisprodj_id.wiki_tab0))),INPUT > > (_type="submit",_value="Save"),_class='ajaxform1') # ,sanitize=True > > does not show inages in form? > > if form_wikitab0.accepts(request.vars,session,keepvalues=True): > > thisprodj_id.update_record > > (wiki_tab0=form_wikitab0.vars.form_wiki_tab0) > > response.flash="form accepted!" > > elif form_wikitab0.errors: > > response.flash="form is invalid!" > > return dict > > (form_maintab=form_maintab,form_wikitab0=form_wikitab0,prodj=thisprodj_id) > > > in view: > > <script><!-- > > $(document).ready(function(){ > > var oFCKeditor = new FCKeditor( 'form_main_tab' ) ; > > oFCKeditor.BasePath = "/{{=request.application}}/static/fckeditor/" ; > > oFCKeditor.ReplaceTextarea() ; > > var oFCKeditor2 = new FCKeditor( 'form_wiki_tab0' ) ; > > oFCKeditor2.BasePath = "/{{=request.application}}/static/fckeditor/" ; > > oFCKeditor2.ReplaceTextarea() ;}); > > > //--></script> > > <h1>{{=prodj.name}}</h1> > > <div class="tabs"> > > <ul class="tabsul"> > > <li>Prodj Home</li> > > <li>Wiki</li> > > <li>Parts List</li> > > <li>Files</li> > > {{=LI(A("Show Prodj",_href=URL(r=request,f='m202',args= > > [prodj.id]),_class='local'))}} > > </ul> > > <div> > > {{=form_maintab}} > > </div> > > <div>{{=form_wikitab0}}</div> > > <div></div> > > <div></div> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

