Reputation: 1
I am trying to edit a php form (two different div segments).
I am trying to add minlength to a single line text field input. Maxlength works, but only because it is part of the underlying theme. (The form is part of a theme). I can add minlength, but it doesn't have an effect.
Similarly, minlength or maxlength doesn't have an effect on the textarea field (another div, same form). Oddly enough, data-parsley-required="true" works, so the text field becomes required. What am I doing wrong?
Cheers Siegfried
Example 2)
<div class="row">
<div class="col-md-12 col-lg-12 col-xs-12 col-sm-12">
<label class="control-label">' . __('Description') . ' <small>' . __('') . '</small><span class="required">*</span></label> <textarea rows="3" class="form-control" maxlength="14" name="description" id="description" type="text" data-parsley-required="true" data-parsley-error-message="' . __('Please describe yourself') . '">' . $description . '</textarea>
</div>
</div>
In the code above you can see that I inserted maxlength after class="". Unfortunately, this does not show in the form - I can input unlimited characters.
Upvotes: 0
Views: 166