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
- New YourCause Community TEST
- New SKY Community TEST
- New Grantmaking TEST Community
- New Altru Test Community
- New bbcon Community - TEST
- 12 Blackbaud Agents for Good™
- New Raiser's Edge NXT Community
- 7 Blackbaud Community Help
- 218 bbcon®
- 1.4K Blackbaud Altru®
- 409 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.2K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 16 donorCentrics®
- 361 Blackbaud eTapestry®
- 2.7K Blackbaud Financial Edge NXT®
- 680 Blackbaud Grantmaking™
- 598 Blackbaud Education Management Solutions for Higher Education
- 3.3K Blackbaud Education Management Solutions for K-12 Schools
- 952 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 85 JustGiving® from Blackbaud®
- 7K Blackbaud Raiser's Edge NXT®
- 3.9K SKY Developer
- 257 ResearchPoint™
- 123 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 247 Member Lounge (Just for Fun)
- 40 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Closed) 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
- 822 Community News
- 3.1K Jobs Board
- 57 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
