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 1011513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:14:45+00:00 2026-05-16T09:14:45+00:00

This is what I’m trying to do. Have one main form with all the

  • 0

This is what I’m trying to do. Have one main form with all the data and have several dialogs, from which the data will be added to the main form.

After all the data is in the main form I will submit the form. But the problem is it won’t save the values of the data in the dialogs when I copy the html to the main form. It won’t put the values in the post string, the post string will show the name but containing an empty value.

This is my html:

<div class="form">
<form method="post" enctype="multipart/form-data" action="/admin/home/create/" class="niceform">
    <fieldset>
        <dl>
            <dt><label>Name:</label></dt>
            <dd><input class="NFText" name="name" id="" size="54" type="text"></dd>
        </dl>
        <dl>
            <dt><label>StaffPicks:</label></dt>
            <dd >
                <a onClick="openStaffPickDialog()" class="bt_green"><span class="bt_green_lft"></span><strong>Manage Staffpicks</strong><span class="bt_green_r"></span></a></dd>
        </dl>
        <dl>
            <dt><label>Reviews:</label></dt>
            <dd><a onClick="openReviewDialog()" class="bt_green"><span class="bt_green_lft"></span><strong>Manage Reviews</strong><span class="bt_green_r"></span></a></dd>
        </dl>
        <dl>
            <dt><label>Carousel(Add Slide to Carousel):</label></dt>
            <dd><a onClick="openCarouselDialog()" class="bt_green"><span class="bt_green_lft"></span><strong>Add Carousel</strong><span class="bt_green_r"></span></a></dd>
        </dl>
        <dl>
            <dt><label>Theme:</label></dt>
            <dd><input class="NFText" name="theme" id="" size="54" type="text"></dd>
        </dl>
        <div id="appendform"></div>

        <input type="hidden" id="slidecount" name="slidecount" value="1"/>

        <dl class="submit">
            <img class="NFButtonLeft" src="/admin/img/0.png"><input type="submit" value="Save" id="submit" name="submit" class="NFButton"><img src="/admin/img/0.png" class="NFButtonRight">
        </dl>

</fieldset>
<div id="hiddeninform" style="visibility:hidden; height:1px;"></div>
</form> 
</div>
<div style="visibility:hidden; height:1px;">
    <div id="carouseldialog">
        <form id="carouselform">
            <div id="carouselslides">
                <div id="slide1"><label>LinkURL:</label><input name="linkurl1" type="text" /><br/>
                <label>Upload Image</label><input name="slideimage1" type="file" /><br/></div>
            </div>
            <a onClick="addSlide()" class="bt_green"><span class="bt_green_lft"></span><strong>Add Slide</strong><span class="bt_green_r"></span></a>
            <a onClick="removeSlide()" class="bt_red"><span class="bt_red_lft"></span><strong>Remove Slide</strong><span class="bt_red_r"></span></a>
        </form>
    </div>


    <div id="carouselslide">
        <div id="slidenonumber">
            <br/>
            <label>LinkURL:</label><input name="linkurl" id="linkurl" type="text" /><br/>
            <label>Upload Image</label><input name="slideimage" id="slideimage" type="file" /><br/>
        </div>
    </div>
    <div id="staffpickdialog">
        <div id="staffpicksaddto">
                <select id="staffpicks" name="staffpicks" size="1">
                    {% for program in programs %}
                    <option value="{{program.key.name}}">{{program.name}}</option>
                    {% endfor %}
                </select>
            </div>
            <a onClick="addStaffpick()" class="bt_green"><span class="bt_green_lft"></span><strong>Add Staffpick</strong><span class="bt_green_r"></span></a></dd>
            <a onClick="removeStaffPick()" class="bt_red"><span class="bt_red_lft"></span><strong>Remove Staffpick</strong><span class="bt_red_r"></span></a>

    </div>
    <div id="staffpickhidden">
                <br/>
                <select id="staffpicks" name="staffpicks"  >
                    {% for program in programs %}
                    <option value="{{program.key.name}}">{{program.name}}</option>
                    {% endfor %}
                </select>
    </div>

    <div id="reviewdialog">
        <div id="reviewsaddto">
            <textarea cols="60" rows="5" id="reviews" name="reviews"></textarea>
        </div>
            <a onClick="addReview()" class="bt_green"><span class="bt_green_lft"></span><strong>Add Staffpick</strong><span class="bt_green_r"></span></a></dd>
            <a onClick="removeReview()" class="bt_red"><span class="bt_red_lft"></span><strong>Remove Staffpick</strong><span class="bt_red_r"></span></a>

    </div>


    <div id="reviewhidden">
        <br/>
        <textarea cols="60" rows="5" id="reviews" name="reviews"></textarea>
    </div>

</div>

This is my javascript:

function openReviewDialog(){
$('#reviewdialog').dialog({
        width: 480,
        modal: true,
        buttons: {
            'Save': function() {
                $('#hiddeninform').append($('#reviewsaddto').html())
                $(this).dialog('close');
            },
            Cancel: function() {
                $(this).dialog('close');
            }
        }
})

}

  • 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-16T09:14:45+00:00Added an answer on May 16, 2026 at 9:14 am

    I’m pretty sure values aren’t passed when you call .html on a form input element. Try looping through all of the elements in your dialog and adding them as hidden elements to the form.

    $("select, textarea, input", $("#dialog")).each(function (i) {
        $("#hiddeninform").append($("<input/>").attr("name", $(this).attr("name")).val($(this).val()));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
This is my first time creating a PHP form that will run a MySQL
This one has me scratching my head. I have an app with views that
I have some data like this: 1 2 3 4 5 9 2 6
This removes all spaces: irb(main):021:0> 'gff gf ggfgfg '.gsub(' ','') => gffgfggfgfg but I
This has been a rather problematic issue on numerous occasions. We have alot of
I am trying to understand how to use SyndicationItem to display feed which is
For some reason, after submitting a string like this Jack’s Spindle from a text
This is my first attempts at creating a data-mart/warehouse and I am a little

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.