I'm building out a front end form that users will use to fill out with their information. Naturally, when a user first signs up, their profile fields are empty and a blank space appears for them to add in their info later.
This works well on all fields on my form except the table field type. If nothing has been entered the loop will simply display nothing. I've been reading through this answer, but so far checking is empty
or |length
is not working on my form.
Here's my current loop, which works great as long as the info is entered through the CP. How do I get an empty table field type to display on the front-end so a user can update their profile?
<tr>
<td>Institution</td>
{% for row in currentUser.providerCredentials %}
<td><input type="text" id="accreditingInstitution" class="name-field" name="fields[providerCredentials][0][col1]" value="{{row.accreditingInstitution}}"></td>
{% endfor %}
</tr>