formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.22k stars 405 forks source link

HTML in Radio or Checkbox Values #580

Closed austinstudio closed 8 years ago

austinstudio commented 8 years ago

I need help. I am trying to put the tag within a checkbox option within a group of checkboxes. I tried using $sce.trustAsHtml but that didn't work, neither did just putting the html in the name value. Code below. No matter what I do, the HTML inside of the name doesn't evaluate. Any ideas?

{
    key: 'applicable_parcel_exemptions',
        type: 'customMultiCheckbox',
        className: 'col-md-12',
        templateOptions: {
        label: 'Select exemption(s) applicable for this parcel:',
        options: [
        {
                    "name": "<abbr title='Industrial Facilities Exemption'>IFT</abbr> (P.A. 198) Exemption", "value": "01"
            },
            {
                    "name": "Michigan Strategic Fund (MSF) Resolution", "value": "02"
            },
            {
                    "name": $sce.trustAsHtml('<abbr title="New Personal Property Exemption">P.A. 328</abbr> Exemption'), "value": "03"
            },
            {
                    "name": "Renaissance Zone Reduction Exemption", "value": "04"
            }
        ]
    }
}
benoror commented 8 years ago

Hi @austinstudio! Thanks for your interest in angular-formly. I'm sure that angular-formly can do this for you. Also, do you mind creating an example of what you're trying to accomplish?. The best way to get help is by following the instructions here: http://help.angular-formly.com

I'm going to go ahead and close this issue because the github issues for this project are reserved for bug reports and feature requests. See you on chat! Thanks!