try form[0][-1][1].components = [ TAG.button('Upload', _id="px-submit",_type="submit"), TAG.button('Clear',_id="px-clear",_type="reset"), ]
or you can use a custom form. On Friday, 6 July 2012 17:09:41 UTC-5, Andrew Evans wrote: > > Hello I am trying to figure out how to replace the submit button in SQLFORM > > I would like to replace with > > <button id="px-submit" type="submit">Upload</button> > > and add > > <button id="px-clear" type="reset">Clear</button> > > My controller is > > def index(): > form = SQLFORM(db.music2) > if form.accepts(request.vars, session): > #db.music2.insert(song = > db.music2.song.store(request.vars.Filedata.file, > request.vars.Filedata.filename)) > response.flash = 'Your data has been submitted' > elif form.errors: > response.flash = 'Please correct the highlighted fields' > return dict(form=form) > else: > return dict(form=form) > > return dict() > > Any ideas/advice is greatly appreciated :-) > > >