Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JackD's avatar

form inside a form

is it allowed to have form inside a form?

i have this kind of form structure and the data for fields below the form to remove image is not being displayed and im not getting any error

my edit form structure

<form>
//input field forms
    <form>
        //form to remove image
    </form>

//data from database is not being retrieve for the fields here
</form>
0 likes
4 replies
JackD's avatar

any idea how to execute the delete inside the form?

1 like
RedHerring's avatar

I'm not sure exactly what you're trying to accomplish... it sounds like you're trying to have one button that deletes the image, and a second button that does something else?

I will hereby admit to being a complete Laravel noob, still going through the fundamentals videos, so please forgive my poor response from a Laravel point of view. But, this is an HTML-related question, really, so I hope I can help.

From an HTML point of view, you want something like this:

<input type="submit" name="update_button" value="Update" />
<input type="submit" name="delete_button" value="Delete" />

To Laravel-ize this, as I understand, you'd add something like this in your view:

{{ Form::submit('Update', array('class' => 'btn', 'name'=>'update_button')) }}
{{ Form::submit('Delete', array('class' => 'btn', 'name'=>'delete_button')) }}

There may well be a better Laravel way to do this, but I haven't gotten to that point in the tutorial yet. :)

Please or to participate in this conversation.