0

I have form in which I have 8 fields for image upload. So on mobile browse button allows users to take photo and use as attachment. So when any user use this scenario while submitting the form it does not submit like after submit button it waits for sometime and revert back to the form. While debug I found that form is not considering as submitted. It seems to be like Timeout or something.

<form action="" method="post" id="addClaim" class="form-horizontal" enctype='multipart/form-data'>

<input type="file" class="form-control" name="group-a[fault_img][1]" placeholder="Fault Image" />

<input type="file" class="form-control" name="group-a[fault_img][2]" placeholder="Fault Image" />

<input type="file" class="form-control" name="group-a[fault_img][3]" placeholder="Fault Image" />


<input type="file" class="form-control" name="group-a[fault_img][4]" placeholder="Fault Image" />


<input type="file" class="form-control" name="group-a[fault_img][5]" placeholder="Fault Image" />


<input type="file" class="form-control" name="group-a[fault_img][6]" placeholder="Fault Image" />

</form>


in CI Controller under my form submit handler. 
<?php 

$postData = $this->input->post();
if(isset($postData) && !empty($postData) ){
  echo '<pre>';
  print_r($postData);
  die;
}

this works well in desktop and mobile when I select images from my image gallery. but when I use different option in mobile which says take photo or video then It didn't work.

  • Does this answer your question? [How to access a mobile's camera from a web app?](https://stackoverflow.com/questions/8581081/how-to-access-a-mobiles-camera-from-a-web-app) – Refilon Dec 03 '19 at 15:37
  • @Refilon no in my browsers already have an option for take photo while you click on browse button. problem is when you captured all images at that same time and then click to submit it didn't submit the form – Ashish Jangra Dec 03 '19 at 15:39

0 Answers0