vendredi 19 juillet 2019

form displaying in controller popup

i make form that i want to link in with controller called companies controller but i add form code inside the list it show the hole code ink the web page

                        <a
                                href="#"
                                onclick="
                                 var result = confirm('are you sure you want to delete this project?');
                        if(result){
                            event.preventDefault();
                            document.getElementById('delete-form').submit();
                        }
                        "
                           >
                            Delete
                        </a>
                        <form id="delete-form" action="
                                method="post"  style="display:none;">
                        <input type="hidden" name="_method" value="delete">
                        
                        </form>

                     </li>

in the web page only the delete should visible in the section not other part of the code



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire