I'm pretty newbie in wordpress and I'm having some difficulties dealing with a simple form layout / submission. I have a page (created from the wp-admin page) that holds the following code:
<div class="container-fluid">
<form class="form-horizontal" action="" method="POST" >
<div class="row form-group">
<div class="col-xs-12">
<label for="name">Nome</label>
<input type="text" class="form-control" id="name" name="name" />
</div>
</div>
<div class="row form-group">
<div class="col-xs-12">
<label for="residence">Residência</label>
<input type="text" name="residence" id="residence" />
</div>
</div>
<div class="row form-group">
<div class="col-sm-6">
<input class="btn btn-default" type="submit" value="Registar">
</div>
</div>
<form>
</div>
My problem here is that I don't know what to put in the action attribute and how to process the form afterwards. I have tried to create a php file in the template folder and put it in the action but it did not work at all. I have also seen some actions that can be added to functions.php but I don't see that as the best solution to the problem. All I want is to submit the form, store it in the database as meta-data and redirect the user to the main page.