Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Registration: allow default Price Set values from the URL #22313

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

mlutfy
Copy link
Member

@mlutfy mlutfy commented Dec 23, 2021

Overview

Contribution Pages allow site-admins to share an URL with arguments such as price_123=22 so that the form has specific default values. This was is not currently possible with events.

This PR implements the same solution for default values for public Event registration.

See: https://civicrm.stackexchange.com/questions/40181/query-string-to-pre-select-price-field-for-events

image

Technical Details

Based on the code from Contribution Pages. Admittedly some copy-pasting.

Comments

It does not work for multiple-participant registration (it only sets on the first participant).

@civibot
Copy link

civibot bot commented Dec 23, 2021

(Standard links)

@civibot civibot bot added the master label Dec 23, 2021
@andyburnsco
Copy link
Contributor

I've tested this on Civi 5.35.2 for radio, checkbox and text/numeric quantity field types and it works perfectly.

@seamuslee001
Copy link
Contributor

Merging as per the testing

@seamuslee001 seamuslee001 merged commit 88bed5e into civicrm:master Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants