Jump to content

complaint management


LightBlue82

Recommended Posts

Find the template file for the complaint form, typically located in the module's views/templates/front/ folder or under the theme’s template files.
<div class="form-group">
<label for="purchase_date">Purchase Date</label>
<input type="date" id="purchase_date" name="purchase_date" required>
</div>

Adding required in the HTML will make it mandatory in the front end.
In the controller that processes the complaint form submission (usually a ModuleFrontController file in the module folder), add validation for the "Purchase Date" field.
if (empty(Tools::getValue('purchase_date'))) {
$this->errors[] = $this->module->l('Purchase Date is required.');
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...