Forum Moderators: not2easy
Its a bit different to an html page - I can add input fields but there is no form tag. Can anyone tell me how to get a PDF to display an error message if a certain box hasn't been completed e.g. the address box?
I can do it if I create a submit button and a 'required field' but the message says 'so and so was found empty during export'. - I don't want 'export' to appear, it is misleading. I want a message that I specify to appear if a field is empty or not enough characters in it.
My java script is like this (but it doesn't work).
function validate()
{
submitOK="True";
var message = "Form incomplete, please enter your:\n";
if (document.Address.value.length<10)
{ message += "Address at the top of the form.\n";
submitOK="False"; }
if (submitOK=="False")
{
alert(message)
return false;
}
else
{
return true;
}
}
Are you using Acrobat's built-in script editor function?
I don't need fancy calculations, I just need a basic 'required fields' thing. The PDF doesn't export any info it is meant to be printed and posted after completion (so the 'problem on export' message might worry a user).