Skip to content

Skvare/com.skvare.priceset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Price Field Option for Min and Max Amount Setting

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.

Requirements

  • PHP v7.2+
  • CiviCRM v5.0+

Installation (Web UI)

Learn more about installing CiviCRM extensions in the CiviCRM Sysadmin Guide.

Installation (CLI, Zip)

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.zip

Installation (CLI, Git)

Sysadmins 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 priceset

Usage

After installation, you can configure amount ranges for text-based price fields:

  1. Navigate to AdministerCiviContributePrice Sets
  2. Edit an existing price set or create a new one
  3. When editing a price field with HTML type "Text", you'll see a new option: "Set Amount range"
  4. Check this option to enable minimum and maximum amount validation
  5. Enter your desired minimum and maximum amounts
  6. Save the price field

The extension will automatically validate user input on contribution forms, ensuring entered amounts fall within your specified range.

Features

  • 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

Technical Details

The extension hooks into several CiviCRM form processes:

  • hook_civicrm_buildForm(): Adds range configuration fields to the price field form
  • hook_civicrm_postProcess(): Saves range settings to CiviCRM settings
  • hook_civicrm_validateForm(): Validates user input against configured ranges

Settings are stored using CiviCRM's settings API with field-specific keys.

Support and Contributing

Credits

Developed by Skvare, LLC for the CiviCRM community.

About Skvare

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:

Support

Contact us for support or to learn more.


Related Extensions

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.

About

Price Field option for min and max amount setting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published