This CiviCRM extension enhances price fields by adding the ability to set minimum and maximum amount ranges for text-based price fields. This is particularly useful for donation forms, event registrations, or membership fees where you want to enforce contribution limits while still allowing donors to enter their preferred amount within a specified range.
The extension allows administrators to configure price fields with custom minimum and maximum amounts, providing better control over contributions and ensuring amounts fall within acceptable ranges.
The extension is licensed under AGPL-3.0.
- PHP v7.2+
- CiviCRM v5.0+
Learn more about installing CiviCRM extensions in the CiviCRM Sysadmin Guide.
Sysadmins and developers may download the .zip file for this extension and
install it with the command-line tool cv.
cd <extension-dir>
cv dl com.skvare.priceset@https://github.com/Skvare/com.skvare.priceset/archive/master.zipSysadmins and developers may clone the Git repo for this extension and install it with the command-line tool cv.
git clone https://github.com/Skvare/com.skvare.priceset.git
cv en pricesetAfter installation, you can configure amount ranges for text-based price fields:
- Navigate to Administer → CiviContribute → Price Sets
- Edit an existing price set or create a new one
- When editing a price field with HTML type "Text", you'll see a new option: "Set Amount range"
- Check this option to enable minimum and maximum amount validation
- Enter your desired minimum and maximum amounts
- Save the price field
The extension will automatically validate user input on contribution forms, ensuring entered amounts fall within your specified range.
- Range Validation: Enforce minimum and maximum amounts for text-based price fields
- User-Friendly Messages: Clear error messages when amounts are outside the allowed range
- Administrative Control: Easy configuration through the standard CiviCRM price field interface
- Form Integration: Seamless integration with contribution and event registration forms
The extension hooks into several CiviCRM form processes:
hook_civicrm_buildForm(): Adds range configuration fields to the price field formhook_civicrm_postProcess(): Saves range settings to CiviCRM settingshook_civicrm_validateForm(): Validates user input against configured ranges
Settings are stored using CiviCRM's settings API with field-specific keys.
- Issues: Report bugs and feature requests on GitHub Issues
Developed by Skvare, LLC for the CiviCRM community.
Skvare LLC specializes in CiviCRM development, Drupal integration, and providing technology solutions for nonprofit organizations, professional societies, membership-driven associations, and small businesses. We are committed to developing open source software that empowers our clients and the wider CiviCRM community.
Contact Information:
- Website: https://skvare.com
- Email: info@skvare.com
- GitHub: https://github.com/Skvare
Contact us for support or to learn more.
You might also be interested in other Skvare CiviCRM extensions:
- Database Custom Field Check: Prevents adding custom fields when table limits are reached
- Image Resize: Automatically resizes contact images for consistent display
- Registration Button Label: Customize button labels on event registration pages
- Unlink User Account: Safely unlink user accounts from contacts without deleting data
For a complete list of our open source contributions, visit our GitHub organization page.