EE v2.7.3 Matrix v2.5.8
I have a Channel:Form where I need to do a ton of custom styling, so I have manually built the form markup, using exactly what is rendered out by {field:my_matrix_field}.
I am not able to upload a new file or replace an existing file through this method.
I can: Upload files in the control panel Upload files by using {field:my_matrix_field} inside the form Upload files by using my own markup tied to a single, non-matrix file field. Post & updated data in text fields within the matrix field, using my own markup.
I cannot: Upload files using my own markup to a matrix field.
Markup created by {field:my_matrix_field}:
<input type="file" name="cb-video[row_id_22][col_id_7]" class="file-chooser">
<input type="hidden" name="cb-video[row_id_22][col_id_7][existing]" value="logo.jpg|3" class="existing_file">
Markup created by me:
<input type="file" name="cb-video[row_id_22][col_id_7]" class="file-chooser">
<input type="hidden" name="not_cb-video[row_id_22][col_id_7][existing]" value="logo.jpg|3" class="existing_file">
Notice I change the name attr of the hidden field to be prepended with "not_". This mimicks what the Matrix JS does to file fields on edit. The {field:my_matrix_field} version will successfully post the data and my markup will not.
Am I missing an additional hidden field or JS file that should be included? I feel like it should work with the manually created markup, so long as it is identical. It works with the other field types just fine.
Thanks!