Note that there are some explanatory texts on larger screens.

plurals
  1. POForm losing value after mobiscroll selection
    primarykey
    data
    text
    <p>I have a form with two instances of mobiscroll one of which pops depending on the button clicked.</p> <pre><code>$(function(){ $('#clocklater').mobiscroll().time({ theme: 'default', display: 'modal', mode: 'scroller', setText: "Save", cancelText: "Cancel", headerText: "Available after", timeFormat: 'HHii', timeWheels: 'HHii', stepMinute:10 }); $('#later').click(function(){ $('#clocklater').mobiscroll('show'); $('[name=available]').val(2); return false; }); }); $(function(){ $('#clockyes').mobiscroll().time({ theme: 'default', display: 'modal', mode: 'scroller', setText: "Save", cancelText: "Cancel", headerText: "ETA station", timeFormat: 'ii', timeWheels: 'ii', stepMinute:5 }); $('#yes').click(function(){ $('#clockyes').mobiscroll('show'); $('input[name=available]').val(1); return true; }); }); </code></pre> <p>my HTML is <code>&lt;form name="response" action="" method="post" &gt; &lt;input name="clocklater" id="clocklater" class="i-txt" type='hidden' onChange="document.response.submit();"/&gt; &lt;input name="clockyes" id="clockyes" class="i-txt" type='hidden' onChange="document.response.submit();"/&gt; &lt;div class='yes button'&gt;&lt;input id='yes' name='available' type='button' alt="YES" value="yes" /&gt;&lt;/div&gt; &lt;div class='no button'&gt;&lt;input id='no' name='available' type='button' alt="NO" value="no" /&gt;&lt;/div&gt; &lt;div class='later button'&gt;&lt;input id='later' name='available' type='button' alt="later" value="later" /&gt;&lt;/div&gt; &lt;/form&gt;</code></p> <p>(aarrgghh can't get that to format nicely)</p> <p>When I submit the form without calling mobiscroll it all works fine, however when I call mobiscroll after clicking the yes or later buttons the value of the <strong>available</strong> input isn't passed. Console is not generating any errors. </p> <p>As you can see I have tried forcing the value depending on the click, that doesn't work either. If I put an alert in before the return the value is there - this is also indicates the js isn't breaking.</p> <p>Any thoughts on why the value of <strong>available</strong> isn't there? </p> <p>FWIW I am processing the form using PHP.</p> <p><strong>[UPDATE]</strong> I just dumped the POST array and the <strong>available</strong> key isn't even in it.</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.
    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