@@ -147,7 +147,7 @@ General options most field types can handle:
147
147
type: " text" , // Type of field
148
148
title: " Street" , // Title of field, taken from schema if available
149
149
notitle: false , // Set to true to hide title
150
- description: " Street name" , // A description, taken from schema if available
150
+ description: " Street name" , // A description, taken from schema if available, can be HTML
151
151
validationMessage: " Oh noes, please write a proper address" , // A custom validation error message
152
152
onChange: " valueChanged(form.key,modelValue)" , // onChange event handler, expression or function
153
153
feedback: false // inline feedback icons
@@ -300,7 +300,9 @@ scope.
300
300
### select and checkboxes
301
301
302
302
* select* and * checkboxes* can take an object, ``` titleMap ``` , where key is the value to be saved on the model
303
- and the value is the title of the option.
303
+ and the value is the title of the option. In the case of * checkboxes* the values
304
+ of the titleMap can be HTML.
305
+
304
306
``` javascript
305
307
{
306
308
type: " select" ,
@@ -340,7 +342,7 @@ the ```sf-schema``` directive.
340
342
### radios and radiobuttons
341
343
Both type * radios* and * radiobuttons* work the same way, they take a titleMap
342
344
and renders ordinary radio buttons or bootstrap 3 buttons inline. It's a
343
- cosmetic choice.
345
+ cosmetic choice. The value in the titleMap can be HTML.
344
346
345
347
Ex.
346
348
``` javascript
@@ -369,16 +371,9 @@ function FormCtrl($scope) {
369
371
```
370
372
371
373
### help
372
- Help fields is not really a field, but instead let's you inser arbitrary HTML
374
+ Help fields is not really a field, but instead let's you insert arbitrary HTML
373
375
into a form, suitable for help texts with links etc.
374
376
375
- It uses ``` ng-bind-html ``` so you need to include the
376
- [ ngSanitize] ( https://docs.angularjs.org/api/ngSanitize ) module for it to work,
377
- or expicitly turning of strict contextual escaping with
378
- ``` $sceProvider.enabled(false) ``` (not recomended). It's enough to include
379
- ``` angular-sanitize.min.js ``` before ``` angular-schema.min.js ``` and Schema Form
380
- will pick up that it's there and include it as a module dependency.
381
-
382
377
The get a help field you need to specify the type ``` help ``` and have a html
383
378
snippet as a string in the option ``` helpvalue ```
384
379
0 commit comments