Populating tables and matrix fields using GuestEntries
See here for example front-end HTML code for all of Craft's default field types:  https://straightupcraft.com/articles/craft-cms-field-guide-twig?view=input

Matrix:

{# You need to include the 'type' input to identify the matrix block type you are submitting #}
&lt;input type="hidden" name="fields[fieldHandle][new1][type]" value="contacts"&gt;

{# All of your custom fields must be within a 'fields' array. #}
&lt;input type="text" name="fields[fieldHandle][new1][fields][field1Handle]"&gt;
&lt;input type="text" name="fields[fieldHandle][new1][fields][field2Handle]" &gt;
&lt;input type="text" name="fields[fieldHandle][new1][fields][field3Handle]" &gt;

{# For New Entries, you'll want to use the naming convention 


'new1', 'new2', 'new3' for each of your blocks.  For existing entries you 
can update those values to be the block IDs #}
    
    
    

Table:

&lt;input type="hidden" name="fields[fieldHandle]" value=""&gt;
&lt;textarea name="fields[fieldHandle][0][col1]" rows="1"&gt;&lt;/textarea&gt;
&lt;textarea name="fields[fieldHandle][0][col2]" rows="1"&gt;&lt;/textarea&gt;
&lt;textarea name="fields[fieldHandle][0][col3]" rows="1"&gt;&lt;/textarea&gt;
&lt;input type="hidden" name="fields[fieldHandle][0][col4]"&gt;
&lt;input type="checkbox" name="fields[fieldHandle][0][col4]" value="1"&gt;

&lt;textarea name="fields[fieldHandle][1][col1]" rows="1"&gt;&lt;/textarea&gt;
&lt;textarea name="fields[fieldHandle][1][col2]" rows="1"&gt;&lt;/textarea&gt;
&lt;textarea name="fields[fieldHandle][1][col3]" rows="1"&gt;&lt;/textarea&gt;
&lt;input type="hidden" name="fields[fieldHandle][1][col4]"&gt;
&lt;input type="checkbox" name="fields[fieldHandle][1][col4]" value="1"&gt;


Lightswitch:

&lt;input type="hidden" name="fields[fieldHandle]" value="1"&gt;