selectivity
selectivity copied to clipboard
Removed items being passed on POST
Items selected, then unselected are still being passed with the form data:
https://www.screencast.com/t/oVtooqGwl3k
Sorry, I don't have Flash installed here, can you describe the issue in some other way?
Ah, I'm sorry! Here it is as an MP4: https://www.screencast.com/t/feWNGeWir
Thanks! I suppose you're using the jQuery build, right? Can you show me the code you use for initializing Selectivity? Am I understanding correctly it is only removing that's causing an issue, right?
Yes, I'm using the jQuery build. The problem is that when I remove a directory which I had formerly checked, it still submits in the POST data. Thanks for your help with this!
Here's the code:
$(".selectivity").selectivity( { backspaceHighlightsBeforeDelete: true } );
Then..
<select id="cb" name="cb[]" multiple class="selectivity">
<?
for ($s = 0; $s < $snum_results; $s++)
{
echo "<option value=\"$srow[dir]\" ";
if (in_array($srow[dir], $dir_arr))
echo "selected";
echo "> $srow[dir]</option>";
$srow = mysqli_fetch_array($sresult);
}
?>
</select>
Thanks for that code sample! I think what is going wrong is that the selected options you generate in your markup are still being sent when you submit the form. I can agree that's a bug that should be handled by Selectivity, but I have to think how I can easily solve that. Will keep you posted! On Tue, 25 Jul 2017 at 02:35 orthodoxws [email protected] wrote:
Yes, I'm using the jQuery build. The problem is that when I remove a directory which I had formerly checked, it still submits in the POST data. Thanks for your help with this!
Here's the code:
$(".selectivity").selectivity( { backspaceHighlightsBeforeDelete: true } );
Then..
<select id="cb" name="cb[]" multiple class="selectivity"> <? for ($s = 0; $s < $snum_results; $s++) { echo "<option value=\"$srow[dir]\" "; if (in_array($srow[dir], $dir_arr)) echo "selected"; echo "> $srow[dir]</option>"; $srow = mysqli_fetch_array($sresult); } ?> </select>
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/arendjr/selectivity/issues/196#issuecomment-317593909, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgjLgTPpEfaXVZ0WmQaUiU95N4reKNFks5sRThFgaJpZM4NtmmC .
Thank you very much! I appreciate it!