tag it - Jquery Tagit Displaying Unwanted x from DB -


i having issue jquery tagit. working fine, when pull records form database , display them using foreach loop displays labels should adds x @ end text.

the second x 1 should there deletes record. have tried remove × nothing shows @ all. input value returns x after text. not sure doing wrong.

i have provided picture show mean. please me know if needs clarification. assistance.

enter image description here

<?php $my_dietary_requirements = explode(', ', $my_dietary_requirements); ?> <fieldset class="edit-boxes">     <ul class="table-tags" id="my-diet">         <?php foreach($my_dietary_requirements $diet){         echo '<li class="tagit-choice ui-widget-content ui-state-default ui-corner-all tagit-choice-editable">                 <span class="tagit-label">'.$diet.'</span>                 <a class="tagit-close">                   <span class="text-icon">×</span>                   <span class="ui-icon ui-icon-close"></span>                 </a>                 <input value="'.$diet.'" name="my_dietary_requirements[]" class="tagit-hidden-field" type="hidden">              </li>';         } ?>     </ul> </fieldset>   //javascript  //dietary requirements $("#my-diet").tagit({     allowspaces: true,     fieldname: 'my_dietary_requirements[]' }); $('#my-diet .tagit-new input').attr('id','my-dietary-requirements'); 

try changing foreach this:

<?php foreach($my_dietary_requirements $diet){ echo '<li>'.$diet.'         <input value="'.$diet.'" name="my_dietary_requirements[]" class="tagit-hidden-field" type="hidden">      </li>'; } ?> 

i think youre trying add bunch of stuff plugin adds on own, ending making stuff added twice in weird way. concatenating text of nodes inside original <li>


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -