- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 10:11 PM
I am adding fields to the Shopping cart in the Angular template large_shopping_cart.html
I added a texarea field and this works fine.
<textarea class="form-control" ng-model="c.requesterPhone" ></textarea>
However a textarea is too big a field for my purpose but I cannot figure out how to change it to a simple one line string field. I tried with "<text></text>" but that becomes readonly.
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 10:43 PM
Try below :
<div>${Enter Description :} <input type="text" size="30" placeholder="Enter description" class="form-control" ng-model="c.requesterPhone"/></div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 10:27 PM
Hello,
Have you tried the rows='1' ?
Standard for textarea is 2, but should be possible to limit to one.
<textarea class="form-control" ng-model="c.requesterPhone" rows="1"></textarea>
You can also find other useful additions here:
With regards
Anton Lindblad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 10:51 PM
It shrinks the field alright but the user can still expand it and type multiple lines. I do not want that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 05:15 AM
Will it work with md-no-autogrow?
<textarea md-no-autogrow rows="1">
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 01:06 PM
Probably. But I used Akhil's suggestion
<div>${Enter Description :} <input type="text" size="30" placeholder="Enter description" class="form-control" ng-model="c.requesterPhone"/></div>
