Welcome Guest, Not a member yet? Register   Sign In
Jquery Dialog + Form Submit + Controller not playing nicely...
#1

[eluser]RaGe10940[/eluser]
Hello,

I have a form that needs to submit a checkbox (if it is clicked or not to a controller). If it is clicked then the user clicks on submit,

if they don't click it because they don't have a photo ID then they hit cancel (The cancel button is th eonly thing that works)...

what is not working is the actual dialog submitting the form if "Enter Queue" was clicked on...

This is my Jquery :
Code:
[removed]

$(document).ready(function() {
        $(function() {
            var currentForm;
            $("#dialog-confirm").dialog({
                resizable: false,
                autoOpen: false,
                draggable: false,
                height: 310,
                width: 500,
                modal: true,
                buttons: {
                    'Cancel': function() {
                        $(this).dialog("close");
                    },
                    'Enter Queue': function() {
                        currentForm.submit();
                    }
                }
            });
        });

    $("#signinform").submit(function() {
        currentForm = this;
        $('#dialog-confirm').dialog('open');
        return false;
    });
});

[removed]

The controller listens to see if the form that was submitted had the checked check box, if it doesn't then it will show an error "please click on checkbox"

my issue is that the "Enter Queue" button which is also a "OK" kind of button does not submit the form... it doesn't do anything period...


my form :

Code:
<?php echo form_open('studentlogin_controller/agree', 'id="signinform"') ?>
     &lt;input type="checkbox" id="agree" name="options" value="agree"&lt;?php echo form_checkbox('options', 'agree') ?&gt;I have read and understood the above &lt;br /> <font color="#ff0000" size="2">(Please click on the box if you agree to meet all requirements)<br />(If not please do not submit, click "Cancel" and follow the prompt)</font>&lt;/input&gt;
     <br />
     <br />
     <br />
     &lt;?php
     echo anchor('studentlogin_controller/studentlogin', 'Cancel', 'id="Cancel"');
     echo form_submit('submit', 'Submit', 'id="sub"');
     echo form_close();
     ?&gt;

Any help would be great.
#2

[eluser]RaGe10940[/eluser]
Bump for assistance and code updated. This my JsFiddle for the program.




Theme © iAndrew 2016 - Forum software by © MyBB