These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Make button appear at value

jurgen
Registered: Mar 18 2010
Posts: 5

I'm kind of new here, and not really a javascript programmer but a video editor. I am trying to create an assessment, and it works for 99%. The only thing is, I want to make a button invisible, until a certain value is reached.

This value is a calculation of multiple combo boxes and displayed in a textbox. If the value in the textbox is equal to, or higher than 8, a button should appear. Has anyone got an idea? Thanks in advance!

Greetz,

Jurgen

My Product Information:
Acrobat Pro 9.3, Macintosh
jimhealy
Team
Registered: Jan 2 2006
Posts: 146
Is your calculation done? How was it done? If it was done using the Calculation tab, was it a simple sum or did you use a custom calculation? What is the name of the text field?

What you need to do is add a custom calculation that evaluates the value of the text field and sets the button to hidden from there. After you answer my other questions, I can get you what you need.

Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com

jurgen
Registered: Mar 18 2010
Posts: 5
jimhealy wrote:
Is your calculation done? How was it done? If it was done using the Calculation tab, was it a simple sum or did you use a custom calculation? What is the name of the text field?What you need to do is add a custom calculation that evaluates the value of the text field and sets the button to hidden from there. After you answer my other questions, I can get you what you need.

Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools
Thank you Jim, quick response!

It was done in the calculation tab, simple sum. The combo boxes contain the answers to the questions, the value of the answers are displayed in separate textfields (textfield1 for answer1, textfield2 for answer2 etc.) The values of the answers are calculated in "textfield6". If this value reaches 8 or higher, the button "button1" should appear.

Thanks in advance, Jim!


Jurgen
jimhealy
Team
Registered: Jan 2 2006
Posts: 146
The SIMPLEST thing would be to create a new text field, set it to hidden, then add a custom calculation to it with this code:getField("button1").hidden = (Number(getField("textfield6").value) < 8);
Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com

jurgen
Registered: Mar 18 2010
Posts: 5
Jim,

Thank you very much! As simple as it is, it works! Now I can make an assessment for students German language. Thanks again!

Jurgen
RustyWood
Registered: Mar 16 2010
Posts: 83
Hi Jim sorry for jumping on this post but I found your calculation very helpful

Three radio buttons in a group 1 2 + 3 if you sellect 3 allows you to add into text box "participant_1_quantity_additional_packs" a value

getField("participant_1_quantity_additional_packs").hidden = (Number(getField("partcipant_1_check_box").value) < 3);
I'm trying to return "participant_1_quantity_additional_packs" back to zero if 1 or 2 are then checked such as if the client had made a mistake, the number in "participant_1_quantity_additional_packs" remains but hidden so messing up my other calculations

I have tried a few things but as you know my Javascript is very limited

With thanks

Rusty