keren7
keren7

Reputation: 57

Contact form with AngularJs not working

I have found a tutorial on how to work with the angular js, but when I try to implement it into my work, I do not get the same results. Here is the original:

jsfiddle

And here is my work:

jsfiddle

My code for some reason does not show the error labels/ messages and if it does, it shows it under the input field instead of besides it.

 <div class="input-prepend">    
      <span class="add-on"><i class="icon-user"></i></span>

      <input class="form-control" placeholder="Full name (Required)" data-ng-model="name" name="name" type="text" ng-minlength="3"> 
      <span class="label label-danger" data-ng-show="submitted && helpForm.name.$error.required">Required!</span>
      <span class="label label-danger" data-ng-show="submitted && helpForm.name.$error.minlength">Name too short!</span>

 </div>

What can I do?

Upvotes: 1

Views: 90

Answers (1)

Matthias
Matthias

Reputation: 1799

The css class "input-prepend" defines a font-size of 0 (zero!) pixel. Your error labels are children of a div with this class and have a font-size of 75%. This gives a font-size of 0*0.75=0 pixel. Pretty hard to read...

Upvotes: 1

Related Questions