This is the form I have generated using the HTML helper:
<div class="row">
<div class='form-group col-lg-6 col-sm-6'>
<?= HTML::label('Name:','PropertyContactsNew',['class' => 'control-label']); ?>
<?= HTML::textInput("PropertyContactsNew[{$slug_other_contacts}][name][]", '', ['maxlength' => 50, 'class'=>'form-control']) ?>
</div>
<div class='form-group col-lg-6 col-sm-6'>
<?= HTML::label('Company:','PropertyContactsNew',['class' => 'control-label']); ?>
<?= HTML::textInput("PropertyContactsNew[{$slug_other_contacts}][company][]", '', ['maxlength' => 100, 'class'=>'form-control']) ?>
</div>
</div>
I'm looking for a way to indicate required fields in this form and prevent submission if they are empty. I cannot use ActiveForm for some reasons. Do I need to use a JavaScript library for this functionality?