Change Subtitle Text from a Widget

488
3
Jump to solution
12-08-2016 10:19 PM
BrittneyGibbons1
Occasional Contributor

I would like the subtitle text of my application to change based on user input in the application. Although, I was able to do this, it appeared to corrupt the Header Controller of the theme and I was unable to save any edits in WebApp Builder afterwards. It seems like it may cause a problem because a change in the subtitle prompts the reset of the Save button in WebApp Builder. Is it possible to change the subtitle text from within the application without causing problems with the theme? 

Thanks so much.

Brittney

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Brittney,

  Sure you just edit the actual dom element in your code:

var appSubTitleNode = query('.jimu-subtitle.jimu-float-leading')[0];    
appSubTitleNode.innerHTML = "my new subtitle";‍‍‍‍‍‍

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Brittney,

  Sure you just edit the actual dom element in your code:

var appSubTitleNode = query('.jimu-subtitle.jimu-float-leading')[0];    
appSubTitleNode.innerHTML = "my new subtitle";‍‍‍‍‍‍
0 Kudos
BrittneyGibbons1
Occasional Contributor

Thanks so much, that works perfectly. The way I was passing the parameter before must have been the issue.

Brittney

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.

0 Kudos