@@ -61,14 +61,15 @@ Schema Form currently supports the following form field types:
6161|:--------------|:------------------------|
6262| fieldset | a fieldset with legend |
6363| section | just a div |
64- | actions | horizontal button list, can only submit buttons as items |
64+ | actions | horizontal button list, can only submit and buttons as items |
6565| text | input with type text |
6666| textarea | a textarea |
6767| number | input type number |
6868| checkbox | a checkbox |
6969| checkboxes | list of checkboxes |
7070| select | a select (single value)|
7171| submit | a submit button |
72+ | button | a button |
7273
7374
7475
@@ -232,7 +233,16 @@ and the value is the title of the option.
232233 type: " actions" ,
233234 items: [
234235 { type: ' submit' , title: ' Ok' }
236+ { type: ' button' , title: ' Cancel' , onClick: " cancel()" }
235237 ]
236238}
237239` ` `
238240
241+ *button* can have a ` ` ` onClick` ` ` attribute that either, as in JSON Form, is a function *or* a
242+ string with an angular expression, as with ng-click.
243+ [
244+ { type: 'button', title: 'Ok', onClick: function(){ ... } }
245+ { type: 'button', title: 'Cancel', onClick: "cancel()" }
246+ [
247+ ` ` `
248+
0 commit comments