Expand my Community achievements bar.

How to make fillable fields protected until after the email submit button has been pressed.

Avatar

Level 1

I am trying to protect fields within the form until after the person filling out the form has pressed the submitt button.  After the submit button is pressed, I would like for those fields to become fillable so that the person processing the form does not have to print it out to approve it.  Any assistance would be appreciated.

Thanks,

Matt

6 Replies

Avatar

Level 10

Hi,

Once the form is emailed, any script changing the fields' access to "open" would have to happen when the receipent opens the form.

One way that we have dealt with that is to have a "for office use" section.

Acrobat.png

When the receiptent inputs three data strings, known to them, the script in the exit events makes sections visible and open.

Hope that helps,

Niall

Avatar

Level 1

So there is not a script for this function, Is making them a password field the best solution?

Avatar

Level 10

Hi,

The exit events look something like this:

if (receivedBy.rawValue == "a set value" && refNumber.rawValue == "another set value")

{

     TextField1.access = "open";

     TextField2.access = "open";

     NumericField.access = "open";

}

else

{

     TextField1.access = "readOnly";

     TextField2.access = "readOnly";

     NumericField.access = "readOnly";

}

This works where you only have a few fields to protect. If there are lots of fields, then you could write a function to do this automatically. Paul has a LockAllFields example that could be adapted.

You would only need to use the Password Field, if there is a potential that someone could be looking over their shoulder as they are typing in the correct inputs to unlock the fields.

Niall

Avatar

Level 1

I hate to hassle you but here is my script can you tell me what is wrong with it?

form1.#subform[0].#subform[3].Table3.Row1.PROCESSEDBY::postSubmit:form - (FormCalc, both)

if (receivedBy.rawValue == "a set value" & refNumber.rawValue == "another set value")

(ProcessedBy.access="open");

else

(ProcessedBy.access="read only")

Avatar

Level 10

Hi,

The sample script that I gave is just an example. You would need to change it to suit your form.

For example, the "receivedBy" and "refNumber" are two objects on my form. If your form does not have objects with these names, then the script will fail.

A couple of comments on the script:

  • You are using FormCalc, so the if/else structure is different from my example. It would look more like:

if (receivedBy eq "a set value" and refNumber eq "another set value") then
     TextField1.access = "open"
     TextField2.access = "open"
     NumericField.access = "open"
else
     TextField1.access = "readOnly"
     TextField2.access = "readOnly"
     NumericField.access = "readOnly"
endif

  • Again, the above is in the exist event of either field and is checking for specific inputs.
  • I would not use the postSubmit event, as this happens too late. The form is already submitted with the fields set to readOnly.

See a small example here: http://assure.ly/obii8P.

There is a much more complicated solution here: http://assure.ly/ge8Ra9.

Hope that helps,

Niall

Avatar

Level 1

I got it!!!. Thank you for all your help. This one stumped me.