Donation Form - hiding field depending on checkbox field
Hello everyone!
We have a donation form that is used for corporate gifts. It has a checkbox to 'make this gift on behalf of an organization' and I'm trying to figure out if it is possible to hide another field based on if that box is checked or not? I know it is possible with some java script but I am not that skilled with coding so wanted to reach out to all of you and see if anybody has done this before. Here is the form I'm working on: https://secure3.convio.net/fandf/site/Donation2?df_id=3015&mfc_pref=T&3015.donation=form1
Basically I want to hide the 'job title' field if the ' Make this gift on behalf of an organization' box is unchecked. Any help is appreciated, thanks!
We have a donation form that is used for corporate gifts. It has a checkbox to 'make this gift on behalf of an organization' and I'm trying to figure out if it is possible to hide another field based on if that box is checked or not? I know it is possible with some java script but I am not that skilled with coding so wanted to reach out to all of you and see if anybody has done this before. Here is the form I'm working on: https://secure3.convio.net/fandf/site/Donation2?df_id=3015&mfc_pref=T&3015.donation=form1
Basically I want to hide the 'job title' field if the ' Make this gift on behalf of an organization' box is unchecked. Any help is appreciated, thanks!
Tagged:
0
Comments
-
You can toggle the Job Title field with something like this:
if (document.getElementById("organization-name-visiblename").checked == true) {
document.getElementById("donor_occupation_row").style.display = "block";
} else {
document.getElementById("donor_occupation_row").style.display = "none";
}0 -
You also need to add an event listener to the checkbox in order to actually fire Daryl's code when it gets changed.
<script>
document.getElementById("organization-name-visiblename").addEventListener("click", function() {
if (document.getElementById("organization-name-visiblename").checked == true) {
document.getElementById("donor_occupation_row").style.display = "block";
} else {
document.getElementById("donor_occupation_row").style.display = "none";
}
});
</script>0
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 403 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 656 Blackbaud Grantmaking™
- 577 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 939 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.6K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 241 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) 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
- 794 Community News
- 2.9K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
