Highlighted

Dynamic text

Community Beginner ,
Sep 02, 2020

Copy link to clipboard

Copied

Is it possible to make dialog box to have dynamic text that update depending on field value? 

Depending on what you actually want this can be really simple or complicated.
If you just want part of the text in dialog box to change depending on another field value,
make hidden textfield and put calculate code in it to change text depending on that other field value.
Then where you have dialog box code (before code) make variable that point to hidden field that have text that you want,
then where you normaly put text in dialog box just add variable name and thats it.
example: {type: "static_text", name: "Here goes your text"+variable name,},
Also if you use same button to change textfield value make sure to put that code before dialog box.

Topics

How to

Views

60

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Dynamic text

Community Beginner ,
Sep 02, 2020

Copy link to clipboard

Copied

Is it possible to make dialog box to have dynamic text that update depending on field value? 

Depending on what you actually want this can be really simple or complicated.
If you just want part of the text in dialog box to change depending on another field value,
make hidden textfield and put calculate code in it to change text depending on that other field value.
Then where you have dialog box code (before code) make variable that point to hidden field that have text that you want,
then where you normaly put text in dialog box just add variable name and thats it.
example: {type: "static_text", name: "Here goes your text"+variable name,},
Also if you use same button to change textfield value make sure to put that code before dialog box.

Topics

How to

Views

61

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Sep 02, 2020

Copy link to clipboard

Copied

Only if that text is part of an editable text field. You can't update the static text in a dialog once it's displayed.

You can close that dialog and then re-open it and display the new text, though.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Sep 02, 2020

Copy link to clipboard

Copied

Thats what I need. I have some basic knowledge on dialog box and javascript, can you give me some advice what to look for? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Sep 02, 2020

Copy link to clipboard

Copied

Which option do you want to implement? This is quite a complex task, especially closing and then re-opening the dialog object, without losing all the data already entered into it...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Sep 02, 2020

Copy link to clipboard

Copied

It will be just some info text with ok cancel buttons, but part of the text need to be updated depending on value in another field. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Participant ,
Sep 02, 2020

Copy link to clipboard

Copied

Depending on what you actually want this can be really simple or complicated.
If you just want part of the text in dialog box to change depending on another field value,
make hidden textfield and put calculate code in it to change text depending on that other field value.
Then where you have dialog box code (before code) make variable that point to hidden field that have text that you want,
then where you normaly put text in dialog box just add variable name and thats it.
example: {type: "static_text", name: "Here goes your text"+variable name,},
Also if you use same button to change textfield value make sure to put that code before dialog box.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Sep 03, 2020

Copy link to clipboard

Copied

Thank you I tested it and it's working.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
kiki1986 LATEST
New Here ,
Sep 07, 2020

Copy link to clipboard

Copied

"Only if that text is part of an editable text field."

How would I do that? I want to have open dialog box with button to change textfield value and field inside dialog to update  text while still open.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
One Stop Solution for Acrobat
Edit a PDF