How to POST dynamic input tags in codeigniter

I am facing a serious dilemma, and wondering how this would be possible. I have a form built in codeigniter framework. At the end of the form is an input tag which takes a number and appends a new form with exact rows of input tags as the value of the last input tag. I have done this using javascript, code is $('#formName9').on('change', function() { var selected = $(this).val(); $('#subForm').empty(); $("#subForm").append('
Unit Name Owner Name Owner Salutation
'); for (var i=1; i<=selected; i++) { $('#subForm').append('
'+i+'

'); } }); you can see i have used different naming conventions for all the appended tags according to the loop. Now these values need to be posted in order for the PHP[SERVER] to do further work, but how will i post these dynamic values? i have tried to the following, but this just hangs my local server and doesn't go any further $ownerName = array(); for ($i=0; $i<=$blockUnits ; $i+1) { $ownerName[$i] = "ownerName".$i; $this->input->post('ownerName[$i]'); }
Some answers would be appreciated....

以上就是How to POST dynamic input tags in codeigniter的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏