How do you set a Default Value for TextBoxField?

Not just TextBoxField.Value. My intention is in combination with javascript to be able to provide guidance text in a textbox. The user selects the textbox and the default value disappears. If they click out of the textbox without entering anything the default value shows up again.
I have this working using Acrobat Pro (so the javascript is correct). The part I can’t seem to do is set the Default Value.
Any help gratefully accepted.

Kind Regards
Gareth

Hi Gareth,


Thanks for your inquiry. We will appreciate it if you please share your intended PDF output document that you created using Adobe Pro. We will look into it and will guide you accordingly.

Best Regards,

P.S: Please also share your current code and input document here.

I have attached a sample pdf of what I am trying to achieve. Placing the focus on the textbox removes the Default Value text and removing the focus restores it.



I don’t have any code specifically for setting that Default Value… that’s my question to you after all :slight_smile:



All I seem to be able to manage is

textBoxField.Value = “” approach but this isn’t the default value.



You should see the two javascript lines in the sample for onFocus and OnBlur handlers respectively… dependant on that Default Value being set.

Hi Gareth,

Thanks for sharing the details.

I am afraid the requested feature is currently not supported but for the sake of implementation, I have logged this requirement in our issue tracking system under New Features list as PDFNEWNET-38428. We will further investigate this requirement in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

Hi, any progress on this? We have same request for Java version of API

Hi John,


OneVizion_VENDOR:
Hi, any progress on this? We have same request for Java version of API

Thanks for your inquriy. I am afraid the reported feature is still not implemented, it is pending for analysis. We have also logged a feature request(PDFJAVA-36065) in Java version. As soon the feature is implemented in Aspose.Pdf for .NET, it will be ported into Java version as well. However we will notify you as soon as it is implemented.

Best Regards,