Note that there are some explanatory texts on larger screens.

plurals
  1. POFormfields from jquery modal will not post
    primarykey
    data
    text
    <p>What I have is a form that has dynamically created radio form-fields based on a query result. Along with each of these dynamically created form-fields, I wish to be able to open a modal window with a separate form that allows me to add other data to separate table relative to the radio line item. The problem I am having is everything works fine until I post the form. The only results that post are the values of hidden fields. Here is the code.</p> <p><strong>jquery</strong></p> <pre><code>&lt;script type="text/javascript"&gt; $(function() { var options = { open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); }, autoOpen : false, width : 'auto', modal : true, width : 600, height : 500, buttons : { "Submit" : function() { $('#mForm').submit(); return true; }, Cancel : function() { $(this).dialog("close"); } }, close : function() { $('#defaultSectionName').val(''); $('#defaultSectionDesc_hidden').val(''); $('#Photo').val(''); $('#Check2').val(''); $('#Check21').val(''); } }; var num = 1; $("div#parent div").each(function() { var dlg = $('#dialog-window-' + num).dialog(options); $('#image-link-' + num).click(function() { dlg.dialog("open"); return false; }); num = num + 1; }); }); &lt;/script&gt; </code></pre> <p><strong>HTML</strong> </p> <pre><code>&lt;div id="parent"&gt; &lt;div id="dialog-window-#i#" title="#ItemName#" class="uniForm" style="z-index: 1800 !important;"&gt; &lt;p&gt; &lt;form ACTION="index.cfm?#cgi.QUERY_STRING#" class="uniForm" id="mForm" method="post"&gt; &lt;input type="hidden" name="Check2" value="#ID#" id="Check2"&gt; &lt;input type="hidden" name="PhotoNew" value="New" id="Check21"&gt; &lt;div class="ctrlHolder"&gt; &lt;label for="" style="display:none"&gt;&lt;em&gt;*&lt;/em&gt;Picture&lt;/label&gt; &lt;input name="Photo" type="file" id="Photo" value="" size="30" data-default-value="Select file" class="textInput "/&gt; &lt;/div&gt; &lt;div class="ctrlHolder" &gt; &lt;label for="" style="display:none"&gt;&lt;em&gt;*&lt;/em&gt;Section&lt;/label&gt; &lt;input name="Number2" style="z-index:1900 !important;" id="defaultSectionName" value="" size="30" data-default-value="Select Section" class="textInput "/&gt; &lt;p class="formHint"&gt; Select a solution name &lt;/p&gt; &lt;/div&gt; &lt;div class="ctrlHolder"&gt; &lt;label for="" style="display:none"&gt;&lt;em&gt;*&lt;/em&gt;Notes&lt;/label&gt; &lt;textarea name="picture_note" id="defaultSectionDesc_hidden" data-default-value="Additional Picture Notes" size="100" cols="70" rows="10" class="textInput validateMaxLength val-500" &lt;p class="formHint"&gt; additional notes are optional &lt;/p&gt; &lt;/div&gt; &lt;/form&gt; &lt;/p&gt; &lt;/div&gt; &lt;div&gt; &lt;a id="image-link-#i#"&gt; &lt;img src="assets/images/camera-icon.png" alt="o" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>NOTE: this div is included in a cfoutput loop and is nested inside another cfform.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload