limiting # of characters in a line-item-property__field text field

Solved
4cor
New Member
4 0 0

Any suggestions on how to limit the number of characters in a text field?  looking to limit to 20 characters in the example:

<p class="line-item-property__field">
<label for="Heading">please enter a heading</label>
<input required id="the-heading" rows="1" cols="20" type="text" name="properties[Heading]">
</p>

 

thanks!

0 Likes
LukaszFormela
Excursionist
37 7 13

This is an accepted solution.

Hi 4cor,

You may want to try the maxlength attribute for input:
https://www.w3schools.com/tags/att_input_maxlength.asp

 

Thanks,
Lukasz

Looking for part-time Shopify Dev job | UK timezone
0 Likes
4cor
New Member
4 0 0

Appreciate it!  We were trying to make a small adjustment and this small item was eluding us.

0 Likes