I want to insert a checkbox to a HTML form which is stored in a PHP string variable $form:
$form = "
<form action='/action_page.php'>
First name:<br>
<input type='text' value='Mickey'><br>
Last name:<br>
<input type='text' name='lastname' value='Mouse'><br>
<input type='submit' value='Submit'>
</form>";
$checkbox = "<input type='checkbox' name='agree' required> I agree!";
Context: Wordpress add_filter callback gets the form and should add the checkbox at the end of the form.
Thanks!