```
<form method="post" id="user_form">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Add User</h4>
            </div>
            <div class="modal-body">
                <label>Enter First Name</label>
                <input type="text" name="first_name" id="first_name" class="form-control" />
                <br />
                <label>Enter Last Name</label>
                <input type="text" name="last_name" id="last_name" class="form-control" />
                <br />
                <label>Select User Image</label>
                <input type="file" name="user_image" id="user_image" />
                <span id="user_uploaded_image"></span>
            </div>
            <div class="modal-footer">
                <input type="hidden" name="user_id" id="user_id" />
                <input type="submit" name="action" id="action" class="btn btn-success" value="Add" />
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </form>

```

and script in this view:

```
$.ajax({
                    url:"<?php echo base_url() . 'raportowanie/user_action'?>",
                    method:'POST',
                    data:new FormData(this),
                    contentType:false,
                    processData:false,
                    success:function(data)
                    {
                        alert(data);
                        $('#user_form')[0].reset();
                        $('#userModal').modal('hide');
                        dataTable.ajax.reload();
                    }
                });

```

in controller

```
    function user_action(){

    echo 'Action is: '.$this->input->post('action');
}

```

The problem is that $this->input->post('action') don't return value input. If I change the type input on text this $this->input->post('action') is ok and return value = Add. Why this don't work on input type="submit" ? How can i get the value of my input. Please help.