{"action":"created","issue":{"url":"https://api.github.com/repos/Rhyzz/repeatable-fields/issues/19","repository_url":"https://api.github.com/repos/Rhyzz/repeatable-fields","labels_url":"https://api.github.com/repos/Rhyzz/repeatable-fields/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/Rhyzz/repeatable-fields/issues/19/comments","events_url":"https://api.github.com/repos/Rhyzz/repeatable-fields/issues/19/events","html_url":"https://github.com/Rhyzz/repeatable-fields/issues/19","id":145441867,"number":19,"title":"Pre populated row using counter","user":{"login":"brad-klosterman","id":18238330,"avatar_url":"https://avatars.githubusercontent.com/u/18238330?v=3","gravatar_id":"","url":"https://api.github.com/users/brad-klosterman","html_url":"https://github.com/brad-klosterman","followers_url":"https://api.github.com/users/brad-klosterman/followers","following_url":"https://api.github.com/users/brad-klosterman/following{/other_user}","gists_url":"https://api.github.com/users/brad-klosterman/gists{/gist_id}","starred_url":"https://api.github.com/users/brad-klosterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brad-klosterman/subscriptions","organizations_url":"https://api.github.com/users/brad-klosterman/orgs","repos_url":"https://api.github.com/users/brad-klosterman/repos","events_url":"https://api.github.com/users/brad-klosterman/events{/privacy}","received_events_url":"https://api.github.com/users/brad-klosterman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-03T01:34:22Z","updated_at":"2016-04-04T16:39:55Z","closed_at":"2016-04-04T06:00:07Z","body":"Hi, thank you for this. \r\n\r\nI am storing user meta and then populating it in the row on page load. When the meta in the row is pre-populated on the page and then saved only one value is saved. When I add rows they save correctly. When those rows are pre-populated again on the page load and then saved again it only saves the last field. \r\n\r\n`<form id=\"pfile\" action=\"\" method=\"POST\">\t\r\n                            <div class=\"repeat\">\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t<table class=\"wrapper\" width=\"100%\">\r\n                            \t<thead>\r\n        \t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t<td width=\"10%\" colspan=\"4\"><span class=\"add btn-c green-btn\">Add</span></td>\r\n    \t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</thead>\r\n                                <tbody class=\"container ui-sortable \">\r\n                                <?php\r\n\t\t\t\t\t\t\t\tif ( $group1 ) :\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tforeach ( $group1 as $field ) {\r\n\t\t\t\t\t\t\t\t?>\r\n                                \r\n\t\t\t\t\t\t\t\t\t<tr class=\"row\">\r\n                                    \t<td class=\"pointer\" width=\"20%\">\r\n                                        \t<span class=\"move blue-btn btn-c\">Move</span>\r\n                                        </td>\r\n\t\t\t\t\t\t\r\n                                        <td width=\"70%\">\r\n                                        <label for=\"digital_cv_option1\">Option1</label>\r\n                                        \t<dl>\r\n        \t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t<dt>option1</dt>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<dd><input name=\"group1[$ic][0]\" id=\"\" type=\"text\" class=\"form-control\" value=\"<?php if($field[0] != '') echo esc_attr( $field[0] ); ?>\" /></dd>\r\n                                                <dt>option2</dt>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<dd><input name=\"group1[$ic][1]\" id=\"\" type=\"text\" class=\"form-control\" value=\"<?php if($field[1] != '') echo esc_attr( $field[1] ); ?>\" /> </dd>\r\n                                                \r\n        \t\t\t\t\t\t\t\t\t</dl>\r\n            \t\t\t\t\t\t\t</td>\r\n                                        <td class=\"pointer\" width=\"10%\">\r\n                                        \t<span class=\"remove red-btn btn-c\">Remove</span>\r\n                                        </td> \r\n\t\t\t\t\t\t\t\t\t</tr>\r\n                                    \r\n                            <?php\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse :\r\n\t\t\t\t\t\t\t\t// show a blank one\r\n\t\t\t\t\t\t\t?>\r\n                                    <tr class=\"row\">\r\n                                    \t<td class=\"pointer\" width=\"20%\">\r\n                                        \t<span class=\"move blue-btn btn-c\">Move<label for=\"digital_cv_option1\">Option1</label></span>\r\n                                        </td>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n                                        <td width=\"70%\">\r\n                                        \t<dl>\r\n        \t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t<<dt>option1</dt>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<dd><input name=\"group1[$ic][0]\" id=\"\" type=\"text\" class=\"form-control\" value=\"\" /></dd>\r\n                                                <dt>option2</dt>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<dd><input name=\"group1[$ic][1]\" id=\"\" type=\"text\" class=\"form-control\" value=\"\" /></dd>\r\n        \t\t\t\t\t\t\t\t\t</dl>\r\n            \t\t\t\t\t\t\t</td>\r\n                                        <td class=\"pointer\" width=\"10%\">\r\n                                        \t<span class=\"remove red-btn btn-c\">Remove</span>\r\n                                        </td>\r\n\t\t\t\t\t\t\t\t\t</tr>\r\n                            <?php endif; ?>\t\r\n                            \t\t<tr class=\"template row\" style=\"display: none;\">\r\n                                    \t<td class=\"pointer\" width=\"20%\">\r\n                                        \t<span class=\"move blue-btn btn-c\">Move<label for=\"digital_cv_option1\">Option1</label></span>\r\n                                        </td>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n                                        <td width=\"70%\">\r\n                                        \t<dl>\r\n        \t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t<dt>option1</dt>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<dd><input name=\"group1[$ic][0]\"  type=\"text\" class=\"form-control\" disabled/></dd>\r\n                                                <dt>option2</dt>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<dd><input name=\"group1[$ic][1]\"  type=\"text\" class=\"form-control\" disabled/></dd>\r\n        \t\t\t\t\t\t\t\t\t</dl>\r\n            \t\t\t\t\t\t\t</td>\r\n                                        <td class=\"pointer\" width=\"10%\">\r\n                                        \t<span class=\"remove red-btn btn-c\">Remove</span>\r\n                                        </td>\r\n\t\t\t\t\t\t\t\t\t</tr>\t\r\n                            \t</tbody>\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t</table>\r\n\r\n\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"save-btn btn-c\" value=\"Submit\" />\r\n\t\t\t\t\t\t\t</p>\r\n\r\n\t\t\t\t\t\t\t</div>\r\n                            </form>`\r\n\r\n\r\nAny suggestions on what I'm doing wrong?"},"comment":{"url":"https://api.github.com/repos/Rhyzz/repeatable-fields/issues/comments/205385314","html_url":"https://github.com/Rhyzz/repeatable-fields/issues/19#issuecomment-205385314","issue_url":"https://api.github.com/repos/Rhyzz/repeatable-fields/issues/19","id":205385314,"user":{"login":"brad-klosterman","id":18238330,"avatar_url":"https://avatars.githubusercontent.com/u/18238330?v=3","gravatar_id":"","url":"https://api.github.com/users/brad-klosterman","html_url":"https://github.com/brad-klosterman","followers_url":"https://api.github.com/users/brad-klosterman/followers","following_url":"https://api.github.com/users/brad-klosterman/following{/other_user}","gists_url":"https://api.github.com/users/brad-klosterman/gists{/gist_id}","starred_url":"https://api.github.com/users/brad-klosterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brad-klosterman/subscriptions","organizations_url":"https://api.github.com/users/brad-klosterman/orgs","repos_url":"https://api.github.com/users/brad-klosterman/repos","events_url":"https://api.github.com/users/brad-klosterman/events{/privacy}","received_events_url":"https://api.github.com/users/brad-klosterman/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T16:39:55Z","updated_at":"2016-04-04T16:39:55Z","body":"In the jquery do I change {{row-count-placeholder}} to $ic"}}