The signatyre for the SQLFORM constructor has an attribute buttons = 
['submit']

At the moment I add a cancel and/or reset button to my forms this way:

form=SQLFORM.factory(..)
    addReserButton(form)
    addCancelButton(form)


def addCancelButton(form):
    
form[0][-1][1].append(INPUT(_type="button",_value="Annuleer",_onclick="javascript:history.go(-1);"))
    return None

def addResetButton(form):
    form[0][-1][1].append(INPUT(_type="reset",_value="Reset"))
    return None

Is it possible to replace this with something like:

form=SQLFORM.factory(
    
Field('subClass',...,formstyle='divs',buttons=['submit','reset','cancel'])

... and replace the functions with a reset and cancel INPUT helper. Where 
would the definition of the INPUT helpers go in my code?


Kind regards,

Annet

-- 



Reply via email to