Showing results for 
Search instead for 
Did you mean: 

How to hide a field on clicking the button

Former Member
0 Kudos

Hi All,


I have a small doubt in using the form. i.e. when the user clicks a button automatically there should be some value need to be passed to a some other field and at the same time some fields need to be made as invisible. How to make this one. i have used the script editor(code) for making these changes.

But i am getting the error, in the form.(its not showing the error as such but its mentioning that adobe encoured some serious error that need to be closed.)

but after coding in the script editor is there any possibility for checking it or debug it.


Ram M

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey Ram,

Wen you are talking about sending a value to be passed to another field, is the value something that is provided, something the user enters or something that is going to be coming from the backend?

If you want to set a field to invisible, all you need to do is get the path of the field in your hierarchy, and

$node.subnode.fieldname.presence = "invisible"

For debugging, the best is to use a message box. Depending on if you are using FormCalc or JavaScript, you can use

$host.messageBox("blah blah blah") 

with FormCalc, or"blah blah blah");

Here is the JavaScript syntax:

Reference_Syntax.messageBox( STRING param1 [, STRING param2 [, INTEGER param3
[, INTEGER param4 ] ] ] )

This also has parameters that can be added to it as well...

param1 - A valid string representing the message to display.

param2 (Optional) - A valid string representing the title to appear in the title bar of the dialog window.

- To help protect against internet spoofing, the dialog window title begins with the text u201CWarning: JavaScript Window -u201D. The window title that you specify in this parameter displays after the warning text.

param3 (Optional) - An integer representing the icon to display in the dialog box.

- 0 (Error) - This is the default.

- 1 (Warning)

- 2 (Question)

- 3 (Status)

param4 (Optional) - An integer representing the buttons to display.

- 0 (OK) - This is the default.

- 1 (OK, Cancel)

- 2 (Yes, No)

- 3 (Yes, No, Cancel)

Hope this helps...



Answers (0)