Access html file from inside UIModel
I have a data form that has a UIModel and html. I need what is shown to change based on user entered information. I know I could set the visibility of fields in the CLR code but does anyone know if its possible to access and alter the html on the fly from within the UIModel code?
Comments
-
Todd,
As far as I'm aware outside of hiding fields I don't think it would be possible outside of directly editing the associated html, css, or javascript files by opening them up, making the changes and resaving them (which is a lot of trouble for very little result).
1 -
@Todd O You should be able to do that with JavaScript (or jQuery) which you can either have directly in the HTML file in a script tag, or a separate JS file in your htmlforms folder (see below for guide on the SDK about JS)
2 -
Hi Todd,
I have pushed a demo of dynamic behavior through JavaScript to my public training repository. If you pull that down, take a look at the following files:
\\Training.Catalog\\Add forms\\DynamicBehaviorDemo.Add.xml
\\Training.UIModel\\htmlforms\\custom\\training\\DynamicBehaviorDemoAddDataForm.html
\\Training.UIModel\\htmlforms\\custom\\training\\DynamicBehaviorDemoAddDataForm.jsHere are the basic steps:
- Create your form with whatever fields you like
- Add a UIModel to that form in the usual way
- Edit the html file of that uimodel by adding a SCRIPT tag to the bottom
- Create a JS file with Blackbaud “bbui” handlers (see Chris Kastner's link, or the example file)
- Add JS code to do whatever you want - you can take jQuery for granted, because BBCRM pulls that in for you.
1 -
@Chris Kastner, @Joseph Styons, thanks for both for the responses. These are very helpful to get me going.
1
Categories
- All Categories
- 6 Blackbaud Community Help
- 213 bbcon®
- 1.4K Blackbaud Altru®
- 401 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®
- 655 Blackbaud Grantmaking™
- 576 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
- 34 PowerUp Challenges
- 3 (Open) 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
- 791 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)

