Skip to Content

Enable the input field when user clicks on check box

Hi All,

I am new to Adobe Forms and need help from you guys.

Gone through sdn links but couldn't find the required solution.

We are sending a PDF Form to bussiness via mail.

1. User opens the pdf & when they clicks on check box then input field should be editable.

2.If they clicks on submit without entering the input field, then it should through Error message.

How to achieve these 2 issues.

Kindly suggest.

Regards,

Bharat

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 31, 2014 at 12:03 PM

    Hi,

    1. You can achieve this by writing the java script code at on change event of checkbox as below

    //For making it disable .

    if(condition){

    TextField1.access = "readOnly" ;

    TexField1.fillColor = "224,224,224"; //Gray color

    }

    else{

    //for making it editable

    TextField1.access = "open" ;


    TexField1.fillColor = "255,255,255" ; //white color

    }

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Bharath Kumar

      Hi Bharath,

      to access any particular field or element first check the hierarchy (check the attach image)

      ex: if i want to make Cell2 non editable, then code will be Node.Main.sfTab1.Table1.Row1.Cell2.access = "readOnly" ;

      (case sensitive)

      so to make table uneditable:

      Node.Main.sfTab1.Table1.access = "readOnly" ;


      2. Display Error message

      at button click event, add code for pop-up message

      if(TextField1.rawValue == null) {
      var oDlg =
      { 
        description: 
        { 
        name: "dialog1", 
        elements: 
        [ 
        {
              type: "static_text",
              name: "Your Error Message",
         },
        { 
        type: "ok_cancel", 
        }, 
        ] 
        } 
      };
      app.execDialog(oDlg);
      }
      

      regards,

      Jyoti

      adobe.JPG (29.3 kB)