Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active January 31, 2018 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/cab87a68f388fa27db680b4e4aa294dd to your computer and use it in GitHub Desktop.
Save Pebblo/cab87a68f388fa27db680b4e4aa294dd to your computer and use it in GitHub Desktop.
An example of how to limit the Year question type, this will limit the selection to 1964 - 1994
<?php //Please do not include the opening PHP tag if you already have one
function tw_year_range_early_range( $early_range, $year_qstn ) {
return 53;
}
add_filter('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__year_question__early_range', 'tw_year_range_early_range', 10, 2);
function tw_year_range_end_range( $end_range, $year_qstn ) {
return -23;
}
add_filter('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__year_question__end_range', 'tw_year_range_end_range', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment