Is it possible to count the number of fields added by user.
<div class="myzebra-repeatable-field">
<input id="cred_form_3584_1_wpcf-ticket-student-name" class="myzebra-control myzebra-text myzebra-prime-name-wpcf-ticket-student-name" type="text" placeholder="" value="" name="wpcf-ticket-student-name[0]">
</div>
<div class="myzebra-repeatable-field" style="display: block;">
<input id="cred_form_3584_1_wpcf-ticket-student-name_repeat_2" class="myzebra-control myzebra-text myzebra-prime-name-wpcf-ticket-student-name" type="text" placeholder="" value="" name="wpcf-ticket-student-name[2]" style="visibility: visible;">
<a class="myzebra-remove-field" href="javascript:;">Remove</a>
</div>
<div class="myzebra-repeatable-field" style="display: block;">
<input id="cred_form_3584_1_wpcf-ticket-student-name_repeat_3" class="myzebra-control myzebra-text myzebra-prime-name-wpcf-ticket-student-name" type="text" placeholder="" value="" name="wpcf-ticket-student-name[3]" style="visibility: visible;">
<a class="myzebra-remove-field" href="javascript:;">Remove</a>
</div>
The first field is required(so there is no remove button), and the rest can be removed, therefore I need to know what I should do to count the number of fields in the end.
Why not simply
?
If you want to explicitely count the ones having the remove link, you can do