Part of the EllisLab Network
   
 
POST array missing submit button
Posted: 21 November 2008 10:34 PM   [ Ignore ]  
Summer Student
Total Posts:  10
Joined  11-02-2008

Very weird.

My form has two submit buttons, “order” and “save” plus 12 combo boxes. Upon submition, I need to know which button was chosen.  I have redirected the forms action to a simple php page with print_r($_POST), so I can see what is in the array.  Everything is listed except the submit buttons.

Does anyone have any idea why this would be happening?  I briefly looked thru the Input class to see if anything stood out. In Input class, var xxs_clean=FALSE. I was thinking CI was somehow clensing the POST.

Also, jQuery.js is installed on this site. I know that’s not relative to this forum, but when I comment out the reference to the JS file, the submit button show up in print_r().

Any help would be appreciated, even if you just tell me its not CI… go to a jQuery forum.

Thanks in advance.

Below I have included the first few items of the form

<!-- Start Button Box -->

                            <
div class="buttonBox">
    
                                <
input name="save" type="submit" id="save" accesskey="s" value="Save" class = "required" />
                                &
#8226;
                                
<input name="order" type="submit" id="order" accesskey="o" value="Order" class = "required" /> 
                                &
#8226;
                                
<input name="reset" type="button" id="reset" accesskey="r" value="Reset">
    
                            </
div>

                        <!-- 
End Button Box -->

<!------------------------------------------------------------------------------------------------>                            

                        <!-- 
Start Details Box -->

                        <
div id="details">                        

                            <!-- 
Start Base Box -->

                            <
div id="baseBox">                            

                                <!-- 
Start Base Combo -->

                                <
div id="baseCombo">

                                    <
label for="base">Base</label>

                                    <
select name="base" id="base" class="required main">

                                        <
option value="none" selected>-- Select a Base --</option>

                                        
<?=$baseOptions?>

                                    
</select>

                                </
div>

                                <!-- 
End Base Combo -->

                                

                                <!-- 
Start Base Options -->

                                <
div id="baseOptions" class="options">

                                

                                    <!-- 
Start Base Color Combo -->

                                    <
div id="baseColorCombo">

                                        <
label for="baseColor" class="sub">Color</label>

                                        <
select name="baseColor" id="baseColor" class="required">

                                                <
option value="none">Choose a Base</option>

                                        </
select>

                                    </
div>

                                    <!-- 
End Base Color Combo --> 
Profile
 
 
Posted: 12 December 2008 06:52 AM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  2
Joined  11-29-2006

I noticed that as well. With jQuery included, the submit button is missing from the $_POST array. Strange.

Profile