Generic AJAX Form
By default renders a generic contact form to show the basic of Magic Forms.
To override the component HTML you need to create a new partial and set filename genericForm/default.htm
.
Note: replace
genericForm
with your component alias name.
You can use this example markup.
<form data-request="{{ __SELF__ }}::onFormSubmit">
{{ form_token() }}
<div id="{{ __SELF__ }}_forms_flash"></div>
<div class="form-group">
<label for="name">Name:</label>
<input type="text" id="name" name="name" class="form-control">
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="text" id="email" name="email" class="form-control">
</div>
<div class="form-group">
<label for="subject">Subject:</label>
<input type="text" id="subject" name="subject" class="form-control">
</div>
<div class="form-group">
<textarea id="comments" name="comments" rows="8" cols="80"></textarea>
</div>
<div class="form-group">
{% partial '@recaptcha' %}
</div>
<button id="simpleContactSubmitButton" type="submit" class="btn btn-default">Submit</button>
</form>