>
> However, this code no longer adds a cancel and or reset button to the form:
>
>  
>
> form[0][-1][1].append(INPUT(_type="button",_value="Cancel",_onclick="javascript:history.go(-1);"))
>
> form[0][-1][1].append(INPUT(_type="reset",_value="Reset"))
>
>
> Why not?
>

The structure of the bootstrap form is different from the other web2py 
forms, so your subscripting doesn't refer to the same element any more. You 
might be better off using the .element() method rather than subscripting:

form.element('input[type=submit]').parent.extend([INPUT(...), INPUT(...)])

or using the new "replace" functionality:

form.element('input[type=submit]',
    replace=lambda button: CAT(button, INPUT(...), INPUT(...)))

Those should work with any formstyle.

Anthony

-- 



Reply via email to