Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

No way to remove label for required field #34

Closed
radzserg opened this issue Jul 6, 2015 · 3 comments
Closed

No way to remove label for required field #34

radzserg opened this issue Jul 6, 2015 · 3 comments

Comments

@radzserg
Copy link

radzserg commented Jul 6, 2015

Not sure is it a bug, but if field is required and label is not set then we still have

<label for="formly_1_input_email_0" class="control-label ng-binding">*</label>

http://www.awesomescreenshot.com/image/383232/ee664a49a14e97762bfaddaccbb6552a

http://angular-formly.com/#/example/other/toggle-required

{
        key: 'text',
        type: 'input',
        templateOptions: {
          //label: 'Moehahah',
          placeholder: 'Formly is terrific!'
        },
        validation: {
          show: true
        },
        expressionProperties: {
          'templateOptions.required': 'model.checked'
        }
      }
@kentcdodds
Copy link
Member

This is how it's always worked and to change it would be a breaking change. But I agree with the change and personally consider it a bug. I'd accept a PR that fixes the wrapper that causes this. You'll want to add an ng-if to this line

@kentcdodds
Copy link
Member

This has been released as a breaking change in 5.0.0. Enjoy :-)

@kentcdodds
Copy link
Member

Check that. I made a mistake. Try 5.0.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants