Overview
The WISDM Product Enquiry Pro (PEP) plugin comes with two types of forms: Default Form and Custom Form.
The Default Form includes several fields such as Name, Email, Product Quantity, Subject, and Message.
Some users may want to remove the Product Quantity field from the default form, either for aesthetic reasons or due to specific requirements.
In this article, we will guide you through the simple process of removing the Product Quantity field from the Default Form using a custom function.
1. Why Remove the Quantity Field?
Removing the Product Quantity field from the default enquiry form may be required for a variety of reasons:
- Simplification: If you do not require customers to enter a quantity when submitting an enquiry, removing this field makes the form simpler and more user-friendly.
- Custom Workflow: If your enquiry process does not depend on quantity or if the product is only available as a single unit, you may want to eliminate this field to avoid confusion.
- Aesthetic Preferences: You may prefer a cleaner form layout without unnecessary fields.
2. Steps to Remove the Quantity Field
To remove the Product Quantity field from the default enquiry form, follow these simple steps:
- Open your Theme’s Functions File:
- Navigate to your WordPress dashboard and go to Appearance > Theme Editor.
- Select your active theme or child theme (recommended) and open the
functions.phpfile.
- Navigate to your WordPress dashboard and go to Appearance > Theme Editor.
- Copy and Paste the Code:
- Copy the following code and paste it into the
functions.phpfile:
- Copy the following code and paste it into the
add_filter('quoteup_fields_txtQty', 'quoteup_remove_qty_field');
function quoteup_remove_qty_field()
{
return null;
}
3. Save the Changes:
- After pasting the code, click Update File to save the changes.
3. Recommendation for Child Theme
It is highly recommended that you copy the above code to the child theme’s functions.php file. This ensures that any updates to the parent theme do not overwrite your customizations.
If you’re not using a child theme yet, you can create one to safely add custom code, ensuring it persists across theme updates.
4. Conclusion
By following these simple steps, you can easily remove the Product Quantity field from the default form in the PEP plugin.
This helps you customize the form according to your business requirements and improves the user experience by simplifying the enquiry process.
If you face any issues or need additional help with form customization, feel free to consult the plugin documentation or contact support.