Answer the question
In order to leave comments, you need to log in
How to transfer an Opencart form?
Good afternoon. There is a form in the contact.tpl file of the template
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" class="form-horizontal">
<fieldset>
<legend><?php echo $text_contact; ?></legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-name"><?php echo $entry_name; ?></label>
<div class="col-sm-10">
<input type="text" name="name" value="<?php echo $name; ?>" id="input-name" class="form-control" />
<?php if ($error_name) { ?>
<div class="text-danger"><?php echo $error_name; ?></div>
<?php } ?>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-email"><?php echo $entry_email; ?></label>
<div class="col-sm-10">
<input type="text" name="email" value="<?php echo $email; ?>" id="input-email" class="form-control" />
<?php if ($error_email) { ?>
<div class="text-danger"><?php echo $error_email; ?></div>
<?php } ?>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-enquiry"><?php echo $entry_enquiry; ?></label>
<div class="col-sm-10">
<textarea name="enquiry" rows="10" id="input-enquiry" class="form-control"><?php echo $enquiry; ?></textarea>
<?php if ($error_enquiry) { ?>
<div class="text-danger"><?php echo $error_enquiry; ?></div>
<?php } ?>
</div>
</div>
<?php echo $captcha; ?>
</fieldset>
<div class="buttons">
<div class="pull-right">
<input class="btn btn-primary" type="submit" value="<?php echo $button_submit; ?>" />
</div>
</div>
</form>
Answer the question
In order to leave comments, you need to log in
You transfer the form code to the footer.tpl template.
Take the missing variables
from catalog\controller\information\contact.php and copy them to catalog\controller\common\footer.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question