Magritte - how to add Submit Buttons to a form

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Magritte - how to add Submit Buttons to a form

squeakman
Hello,

I am using Magritte to display a standard form for my model.  I have
code that looks like this:

form := self asComponent addValidatedForm; yourself;
html render: form.


This gives me a nice form with the standard 'Save' and 'Cancel' buttons.

I would like to add an additional button to the form. I see that
MAContainerComponent>>#addValidatedForm  is where the Save and Cancel
buttons are added but I cannot figure out how to add my own button so
that it appears in the same div as the Save and Cancel buttons.

How do I add a new button to the form?

Thanks for any help you can provide,
Frank


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Magritte - how to add Submit Buttons to a form

Lukas Renggli-2
> How do I add a new button to the form?

Replace #addValidatedForm with something like:

        addValidatedForm: #( save cancel apply )

Then add the method #apply as an extension method to  
MAContainerComponent.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki