0

I have a search form in navigation created with form_open() and the action from the search controller. Now when I want to submit something and disable the form for visualize a processing operation site CodeIgniter shows:

An Error Was Encountered The action you have requested is not allowed.

View File 4 Example:

 <?php echo form_open(array('class' => 'searchform')); ?>
 <input type="text" name="search" value="..." />
 <input type="submit" name="s" value="..." />
 </form>

JS Code:

 $('form.searchform').submit(function()
 {
     $('form.searchform input').attr('disabled', 'true');
 });
Mike
  • 161
  • 1
  • 12
  • It seem to be a problem if I disable the text element after submit and not that the request came from another controller. Any ideas? Thanks! – Mike Dec 16 '14 at 00:15
  • 1
    you need to post some code for us to review. – Karan Thakkar Dec 16 '14 at 05:51
  • This is intended for actions submitted from sites other than your main application. If you need this kind of behaviour for external requests I think that you may disable csrf protection on the controller that will implement your search form logic. Of course that can be a security issue if its not implemented correctly. – sotoz Dec 16 '14 at 12:40
  • Hi I edit the originally question and add an example. Hope you understand the problem. Thanks 4 your help! – Mike Dec 16 '14 at 23:04

0 Answers0