Expand my Community achievements bar.

Chaging static text dynamically.

Avatar

Former Community Member
Hello,



I'm working on a form where the text in a static text field needs to change depending on what data is entered in another part of the form (without a trip to the server).



I tried using a floating field but I can't seem to get the text to change in real time.



I have a static text box with the text "stone's text {myFieldName}" and a button. When the button is clicked, I need the static text to be "stone's text this is the button text". The intention is to add conditions and dynamic content once the prototype is complete.



Here's the code that I have on a click event of a button (client side JavaScript):

form1.sf.myFieldName.rawValue = "this is the button text";

app.alert('Value is-->' + form1.sf.myFieldName.rawValue);



The value is what I expect in the alert, but the text doesn't change in the statice text field.



Am I on the right track? Or Is there another way to have static text change on a click event of a button?



Thanks,

Stone_Golem
2 Replies

Avatar

Former Community Member
You cannot change static text dynamically. You would have to use a text field and adjust the visual look of it so that it look like a static text object to the user.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
I got some colleagues from around the office here to take a look at what I am trying to do and they came to the same conclusion.



Thanks Chris.