Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery modal window removes elements from my form
    primarykey
    data
    text
    <p>jQuery, when i use it to create a modal window which contains form elemets, it takes out those elements when i submit the form.</p> <p>example of the form:</p> <pre><code>&lt;form enctype="multipart/form-data" action="/system/article/add/" class="from" method="post"&gt; &lt;label for="article_title" class="required"&gt;Title:&lt;/label&gt; &lt;input class="formfield" id="article_title" name="article_title" value="" type="text"&gt; &lt;label for="url" class="required"&gt;Url:&lt;/label&gt; &lt;input class="formfield" id="url" name="url" value="" type="text"&gt; &lt;div id="add_photo" style="width: auto;" class="ui-dialog-content ui-widget-content" title="Add Photo"&gt; &lt;label for="photo_title" class="optional"&gt;Photo title:&lt;/label&gt; &lt;input class="formfield" id="photo_title" name="photo_title" value="" type="text"&gt; &lt;label for="photot" class="optional"&gt;Photo thumb:&lt;/label&gt; &lt;input type="file" name="photot" id="photot" class="formfield"&gt; &lt;label for="photo_checkbox" class="optional"&gt;Include lighbox?&lt;/label&gt; &lt;input name="photo_checkbox" value="0" type="hidden"&gt; &lt;input class="checkbox" id="photo_checkbox" name="photo_checkbox" value="1" type="checkbox"&gt; &lt;label for="photo_big" class="optional"&gt;Photo:&lt;/label&gt; &lt;input type="file" name="photo_big" id="photo_big" class="formfield"&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>exaple of JS:</p> <pre><code>&lt;script&gt; $(document).ready(function(){ $("#add_photo").dialog({ autoOpen: false, buttons: { "Ok": function() { $(this).dialog("close"); } } }); }); </code></pre> <p></p> <p>So what i nocited during the inspetion via firebug, is that jquery actually removes my form elements within #add_photo and puts them outside the form in DOM, so even tough in html the modal dialog is within my form, in DOM it isn't .... </p> <p>An this is the reason why i'm having the issue!</p> <p>Have anyone encountered simmilar problem?</p> <p>Any solution?! Thank you very much!</p>
    singulars
    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.
 

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