Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7688427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:55:05+00:00 2026-05-31T19:55:05+00:00

I have a small form that contains a jQuery UI dialog to ask for

  • 0

I have a small form that contains a jQuery UI dialog to ask for additional information if a particular checkbox is checked. The dialog opens and contains 2 additional checkboxes.

The problem is when the form is submitted the 2 checkboxes in the dialog do not get submitted with the rest of the form. From what I can tell when jQuery renders the dialog, it actually renders it outside the closing form tag, causing the checkboxes to not be part of the form anymore.

I have tried things like:

$("#dialog-form").parent().appendTo($("#ContactSpeakerForm:first"));

But have not come up with a good solution.

Here is my js:

$(function() {

    var eventReg = $('#dialog-form').dialog({
        autoOpen: false,
        modal: true,
        buttons: {
            Ok: function() {
                $(this).dialog("close");
            }
        }
    });

    $('#Confirmed').click(function() {
        if($('#Confirmed').attr('checked')) {
            eventReg.dialog("open");
        }
    });
});

Here is the html:

<form id="ContactSpeakerForm" name="ContactSpeakerForm" action="/contacts/add-contact-speaker/id/3420" method="post">

    <input type="hidden" name="ID" value="" id="ID">
    <input type="hidden" name="Contact_ID" value="3420" id="Contact_ID">    

    <div class="page_panel_table">
    <table>
        <tbody>
            <tr>
                <td align="right" class="form_label">Confirmed:</td>
                <td>
                    <input type="checkbox" name="Confirmed" id="Confirmed" value="1">
                </td>
            </tr>
            <tr>
                <td><input type="submit" name="submit" id="submit" value="Save"></td>
            </tr>
        </tbody>
    </table>        
    </div>

    <div id="dialog-form" style="display:none;" title="Speaker Event Registration">
        <input type="checkbox" name="RegisterForEvent" id="RegisterForEvent" value="1">
        <input type="checkbox" name="RegisterForDinner" id="RegisterForDinner" value="1">
    </div>
</form>

Anyone know a good solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:55:06+00:00Added an answer on May 31, 2026 at 7:55 pm

    After setting up your dialog, use:

    eventReg.closest('div.ui-dialog').appendTo('#ContactSpeakerForm');
    

    There are two key things here. First, you run this after the widget has had a chance to initialize and change the mark up. Second, you remove the dependence on the direct parent/child relationship.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small jQuery plugin that I use for form AJAX validation. There
I have a small form inside a table. POSTing that form creates a new
I have defined a small DSL that is mostly written in the form of
I have a small block that contains something like this: Login | Register When
i have written a small form application, which contains textbox only. I have enabled
i have a page,say abc.html, that is having a small form with some fields.
I have a small form that includes a DateTimePicker control. I've customized it so
I have four small single-form utility applications that I have written in Delphi (Win32),
I have a small app where the index page is a form that instructs
I have a ASP.Net web form that contains both text box fields and hidden

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.