Conditionally Display/Hide Data Element on a Donation Form
Does anyone have any experience conditionally showing/hiding a data element on a donation form based on a decision made on another data element?
For example: if someone can choose a from a list of items as a benefit (shirt, hat, water bottle)-- if they choose hat, a question about hat size is displayed; if they choose shirt, a question about shirt size; if they choose water bottle, no additional questions display.
For example: if someone can choose a from a list of items as a benefit (shirt, hat, water bottle)-- if they choose hat, a question about hat size is displayed; if they choose shirt, a question about shirt size; if they choose water bottle, no additional questions display.
Tagged:
0
Comments
-
There a few things here to be aware of. First, create all questions on the form and set them to "NOT REQUIRED" (this is important because you can not require a question that may not be answered because it is not showing). Second hide the secondary question(s) with CSS or JavaScript on load (best to use jQuery $(document).ready). Hide the rows based on some identifying feature (look for a unique row name or elements and use this to navigate to the main container holding it (div or row). Third, add an event handler to the primary question that when changed shows or hides the secondary question to achieve the desired outcome.0
-
Also bear in mind you may need similar hide/show logic for question answers on the thank you page and autoresponder. You can conditionalize this logic based on values being present or not.0
-
This thread talks about this:
https://community.blackbaud.com/forums/viewtopic/1/541320 -
Or here is something similar in jQuery.
<style>
#tribute_honoree_name_row {display: none;}
</style>
<script>
jQuery(document).ready(function ($) {
var tributeChange = function () {
if( $("#tribute_type").val() == "tribute_type_value1") {
$("#tribute_honoree_name_row").show();
$("#tribute_honoree_namename").focus();
} else {
$("#tribute_honoree_name_row").hide();
}
};
$("#tribute_type").on("change", function() { tributeChange (); });
});
</script>0
Categories
- All Categories
- 6 Blackbaud Community Help
- 208 bbcon®
- 1.4K Blackbaud Altru®
- 394 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 358 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 646 Blackbaud Grantmaking™
- 562 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 934 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.4K Blackbaud Raiser's Edge NXT®
- 3.6K SKY Developer
- 242 ResearchPoint™
- 118 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 238 The Tap (Just for Fun)
- 33 Blackbaud Community Challenges
- 28 PowerUp Challenges
- 3 (Open) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 779 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
