1

i have this simple snippet inside a PHP Foreach statement:

<div class="modal fade" id="modale-articoli2-<?= $ordine->id; ?>" tabindex="-1" role="dialog" aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel">Ordine # <?= $ordine->id; ?></h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <h6>Acquirente : <span class="font-weight-bold"><?= $ordine->acquirente; ?></span></h6>
                        <hr>
                        <form method="" action=""><input type="text" name="form-test" id="form-input"/><button type="submit">Send</button></form>
                    </div>
                    <div class="modal-footer">
                        <h5><?= $totale; ?> <small> €</small></h5>
                    </div>
                </div>
            </div>
        </div>

In the dev tab inside Chrome it is shown as

<form method="" action=""></form>
<input type="text" name="prova" id="form-name">
<button type="submit">send</button>

What could be the cause?

  • 1
    Given that field names and the case of text nodes have changed between the code and what you see in the dev tab: The only conclusion is that the source code you've provided does not provide a real representation of the actual code. You need to step back and construct a [mcve] (you also need to look at the HTML source code and work out if the problem exists between the PHP source code and the HTML source code or the HTML source code and the DOM. – Quentin Apr 12 '21 at 13:02
  • Do you have a form nested in a form? – epascarello Apr 12 '21 at 13:04

0 Answers0