About CONFIGLearn how the CONFIG template command enables modifying the properties of PDF text fields.May 11, 2026Knowledge
InformationArticle BodyOverview The CONFIG template command allows you to modify properties of a PDF text field, such as making them readonly, or required during any submission. Use this command to make tweaks to your text fields behavior and appearance. Key Functionalities Make PDF text fields required or not required Make PDF text fields readonly Dynamically calculate or whether a field should have a certain property using JavaScript inside of CONFIG Syntax {# CONFIG [argument object] #} Parameter properties Set these properties on the object passed to CONFIG to modify the behavior of the text field. readonly (boolean) - whether the text field should be readonly or not.required (boolean) - whether the text field should be required during form submissions or not Notes: readonly and required are not compatible. If you set readonly and required to true on the same field, you will get an error. Usage The CONFIG command can only be used as the first command in a text field, and cannot be used multiple times in a text field. If CONFIG is used after another command, or multiple CONFIG commands are placed in a field, it will result in an error. For example, this is valid: {# CONFIG { readonly: true } #} And these are not valid: {# Account.Name #} {# CONFIG { readonly: true } #} {# CONFIG { readonly: true } #} {# CONFIG { required: false } #} Notes The CONFIG command will always be removed from text fields. It never changes the actual contents of a text field.Property values can be set using JavaScript. The evaluated expression must resolve to a boolean or the command will error. Examples Example 1: Make an Invoice Number Readonly To prevent a customer from accidentally modifying an invoce number, use the CONFIG command to make the text field readonly: {# CONFIG { readonly: true #}{# Invoice.Number__c #} The output text field would contain the invoice number, and be readonly. INV-00001 Example 2: Make a Phone Number Required if it is Blank Use JavaScript to set required to true if a field is blank in your org: {# CONFIG { required: !Contact.Phone } #}{# Contact.Phone #} If Contact.Phone is empty, the text field will be required in the merged PDF document. If it is not empty, that value will get added to the text field, and the field will not be required: 123-123-1234 Notes More capabilities will be added to the CONFIG command by adding new properties that can be set. Conclusion CONFIG provides a simple solution to change the behavior of text fields in merged PDF documents. Next Steps About Template CommandsTitleAbout CONFIGURL NameAbout-CONFIG